jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1187285 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user: UserImporter.java UserManagerImpl.java
Date Fri, 21 Oct 2011 10:24:01 GMT
Author: angela
Date: Fri Oct 21 10:24:00 2011
New Revision: 1187285

URL: http://svn.apache.org/viewvc?rev=1187285&view=rev
Log:
JCR-3120 : Change log level in UserManagerImpl#getAuthorizable(NodeImpl) and UserImporter#handlePropInfo

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

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java?rev=1187285&r1=1187284&r2=1187285&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserImporter.java
Fri Oct 21 10:24:00 2011
@@ -198,7 +198,7 @@ public class UserImporter implements Pro
            {@link UserManager#createGroup} respectively. */
         Authorizable a = userManager.getAuthorizable(parent);
         if (a == null) {
-            log.debug("Cannot handle protected PropInfo " + protectedPropInfo + ". Node "
+ parent + " doesn't represent a valid Authorizable.");
+            log.warn("Cannot handle protected PropInfo " + protectedPropInfo + ". Node "
+ parent + " doesn't represent a valid Authorizable.");
             return false;
         }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java?rev=1187285&r1=1187284&r2=1187285&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/UserManagerImpl.java
Fri Oct 21 10:24:00 2011
@@ -762,14 +762,23 @@ public class UserManagerImpl extends Pro
         Authorizable authorz = null;
         if (n != null) {
             String path = n.getPath();
-            if (n.isNodeType(NT_REP_USER) && Text.isDescendant(usersPath, path))
{
-                authorz = createUser(n);
-            } else if (n.isNodeType(NT_REP_GROUP) && Text.isDescendant(groupsPath,
path)) {
-                authorz = createGroup(n);
+            if (n.isNodeType(NT_REP_USER)) {
+                if (Text.isDescendant(usersPath, path)) {
+                    authorz = createUser(n);
+                } else {
+                    /* user node outside of configured tree -> return null */
+                    log.error("User node outside of configured user tree ('" + usersPath
+ "') -> Not a valid user.");
+                }
+            } else if (n.isNodeType(NT_REP_GROUP)) {
+                if (Text.isDescendant(groupsPath, path)) {
+                    authorz = createGroup(n);
+                } else {
+                    /* group node outside of configured tree -> return null */
+                    log.error("Group node outside of configured group tree ('" + groupsPath
+ "') -> Not a valid group.");
+                }
             } else {
-                /* else some other node type or outside of the valid user/group
-                   hierarchy  -> return null. */
-                log.debug("Unexpected user nodetype " + n.getPrimaryNodeType().getName());
+                /* else some other node type -> return null. */
+                log.warn("Unexpected user/group nodetype " + n.getPrimaryNodeType().getName());
             }
         } /* else no matching node -> return null */
         return authorz;



Mime
View raw message