jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1469727 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImpl.java
Date Fri, 19 Apr 2013 07:53:55 GMT
Author: angela
Date: Fri Apr 19 07:53:54 2013
New Revision: 1469727

URL: http://svn.apache.org/r1469727
Log:
OAK-51 : Access Control Management (wip)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImpl.java?rev=1469727&r1=1469726&r2=1469727&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/authorization/AccessControlManagerImpl.java
Fri Apr 19 07:53:54 2013
@@ -30,7 +30,9 @@ import javax.annotation.Nullable;
 import javax.jcr.AccessDeniedException;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
+import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.query.Query;
+import javax.jcr.security.AccessControlEntry;
 import javax.jcr.security.AccessControlException;
 import javax.jcr.security.AccessControlList;
 import javax.jcr.security.AccessControlPolicy;
@@ -216,7 +218,6 @@ public class AccessControlManagerImpl im
             AccessControlPolicy[] plcs = getPolicies(principalAcl.principal);
             PrincipalACL existing = (plcs.length == 0) ? null : (PrincipalACL) plcs[0];
 
-            // TODO: handle re-ordered entries...
             List<JackrabbitAccessControlEntry> toAdd = Lists.newArrayList(principalAcl.getEntries());
             List<JackrabbitAccessControlEntry> toRemove = Collections.emptyList();
             if (existing != null) {
@@ -747,7 +748,7 @@ public class AccessControlManagerImpl im
         }
     }
 
-    private final class PrincipalACL extends NodeACL {
+    private final class PrincipalACL extends ACL {
 
         private final Principal principal;
         private final RestrictionProvider rProvider;
@@ -755,7 +756,7 @@ public class AccessControlManagerImpl im
         private PrincipalACL(String oakPath, Principal principal,
                              List<JackrabbitAccessControlEntry> entries,
                              RestrictionProvider restrictionProvider) {
-            super(oakPath, entries);
+            super(oakPath, entries, namePathMapper);
             this.principal = principal;
             rProvider = restrictionProvider;
         }
@@ -767,6 +768,26 @@ public class AccessControlManagerImpl im
         }
 
         @Override
+        PrincipalManager getPrincipalManager() {
+            return principalManager;
+        }
+
+        @Override
+        PrivilegeManager getPrivilegeManager() {
+            return privilegeManager;
+        }
+
+        @Override
+        PrivilegeBitsProvider getPrivilegeBitsProvider() {
+            return new PrivilegeBitsProvider(root);
+        }
+
+        @Override
+        public void orderBefore(AccessControlEntry srcEntry, AccessControlEntry destEntry)
throws RepositoryException {
+            throw new UnsupportedRepositoryOperationException("reordering is not supported");
+        }
+
+        @Override
         public boolean equals(Object obj) {
             if (obj == this) {
                 return true;



Mime
View raw message