incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From enor...@apache.org
Subject svn commit: r1100046 - /sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java
Date Fri, 06 May 2011 04:29:01 GMT
Author: enorman
Date: Fri May  6 04:29:01 2011
New Revision: 1100046

URL: http://svn.apache.org/viewvc?rev=1100046&view=rev
Log:
revert change from revision 1100034 that checked in by accident.

Modified:
    sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java

Modified: sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java?rev=1100046&r1=1100045&r2=1100046&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java
(original)
+++ sling/trunk/bundles/jcr/jackrabbit-usermanager/src/main/java/org/apache/sling/jackrabbit/usermanager/impl/AuthorizablePrivilegesInfoImpl.java
Fri May  6 04:29:01 2011
@@ -243,6 +243,15 @@ public class AuthorizablePrivilegesInfoI
 						return true;
 					}
 				}
+				
+				//check if the user is a member of the 'User administrator' group
+				Authorizable userAdmin = userManager.getAuthorizable(this.userAdminGroupName);
+				if (userAdmin instanceof Group) {
+					boolean isMember = ((Group)userAdmin).isMember(currentUser);
+					if (isMember) {
+						return true;
+					}
+				}
 			}
 		} catch (RepositoryException e) {
 			log.warn("Failed to determine if {} can remove authorizable {}", jcrSession.getUserID(),
groupId);



Mime
View raw message