jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1434827 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java
Date Thu, 17 Jan 2013 17:59:09 GMT
Author: angela
Date: Thu Jan 17 17:59:09 2013
New Revision: 1434827

URL: http://svn.apache.org/viewvc?rev=1434827&view=rev
Log:
OAK-50 : Implement User Management (WIP)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java?rev=1434827&r1=1434826&r2=1434827&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/UserImporter.java
Thu Jan 17 17:59:09 2013
@@ -224,9 +224,9 @@ public class UserImporter implements Pro
             return false;
         }
 
-        String propString = propInfo.getName();
-        if (UserConstants.REP_PRINCIPAL_NAME.equals(propString)) {
-            if (!isValid(propString, def, UserConstants.NT_REP_AUTHORIZABLE, false)) {
+        String propName = propInfo.getName();
+        if (UserConstants.REP_PRINCIPAL_NAME.equals(propName)) {
+            if (!isValid(def, UserConstants.NT_REP_AUTHORIZABLE, false)) {
                 return false;
             }
 
@@ -247,8 +247,8 @@ public class UserImporter implements Pro
                 }
             }
             return true;
-        } else if (UserConstants.REP_PASSWORD.equals(propString)) {
-            if (a.isGroup() || !isValid(propString, def, UserConstants.NT_REP_USER, false))
{
+        } else if (UserConstants.REP_PASSWORD.equals(propName)) {
+            if (a.isGroup() || !isValid(def, UserConstants.NT_REP_USER, false)) {
                 log.warn("Unexpected authorizable or definition for property rep:password");
                 return false;
             }
@@ -272,8 +272,8 @@ public class UserImporter implements Pro
             }
             return true;
 
-        } else if (UserConstants.REP_IMPERSONATORS.equals(propString)) {
-            if (a.isGroup() || !isValid(propString, def, UserConstants.MIX_REP_IMPERSONATABLE,
true)) {
+        } else if (UserConstants.REP_IMPERSONATORS.equals(propName)) {
+            if (a.isGroup() || !isValid(def, UserConstants.MIX_REP_IMPERSONATABLE, true))
{
                 log.warn("Unexpected authorizable or definition for property rep:impersonators");
                 return false;
             }
@@ -284,8 +284,8 @@ public class UserImporter implements Pro
             referenceTracker.processedReference(new Impersonators(a.getID(), tvs));
             return true;
 
-        } else if (UserConstants.REP_DISABLED.equals(propString)) {
-            if (a.isGroup() || !isValid(propString, def, UserConstants.NT_REP_USER, false))
{
+        } else if (UserConstants.REP_DISABLED.equals(propName)) {
+            if (a.isGroup() || !isValid(def, UserConstants.NT_REP_USER, false)) {
                 log.warn("Unexpected authorizable or definition for property rep:disabled");
                 return false;
             }
@@ -293,8 +293,8 @@ public class UserImporter implements Pro
             ((User) a).disable(propInfo.getTextValue().getString());
             return true;
 
-        } else if (UserConstants.REP_MEMBERS.equals(propString)) {
-            if (!a.isGroup() || !isValid(propString, def, UserConstants.NT_REP_GROUP, true))
{
+        } else if (UserConstants.REP_MEMBERS.equals(propName)) {
+            if (!a.isGroup() || !isValid(def, UserConstants.NT_REP_GROUP, true)) {
                 return false;
             }
             // since group-members are references to user/groups that potentially
@@ -400,8 +400,7 @@ public class UserImporter implements Pro
         }
     }
 
-    private boolean isValid(String propertyName, PropertyDefinition definition,
-                            String oakNodeTypeName, boolean multipleStatus) {
+    private boolean isValid(PropertyDefinition definition, String oakNodeTypeName, boolean
multipleStatus) {
         return multipleStatus == definition.isMultiple() &&
                definition.getDeclaringNodeType().isNodeType(namePathMapper.getJcrName(oakNodeTypeName));
     }



Mime
View raw message