jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1360985 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeRegistry.java
Date Thu, 12 Jul 2012 22:14:22 GMT
Author: jukka
Date: Thu Jul 12 22:14:21 2012
New Revision: 1360985

URL: http://svn.apache.org/viewvc?rev=1360985&view=rev
Log:
OAK-64 : Privilege Management

Trivial PrivilegeRegistry.registerDefinition() implementation with no validation or presistence.

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeRegistry.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeRegistry.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeRegistry.java?rev=1360985&r1=1360984&r2=1360985&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeRegistry.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeRegistry.java
Thu Jul 12 22:14:21 2012
@@ -93,8 +93,12 @@ public class PrivilegeRegistry implement
     public PrivilegeDefinition registerDefinition(String privilegeName,
                                                   boolean isAbstract,
                                                   Set<String> declaredAggregateNames)
throws RepositoryException {
-        // TODO: check permission, validate and register the custom definition
-        throw new UnsupportedOperationException("TODO: Register Privileges");
+        // TODO: check permission, validate and persist the custom definition
+        PrivilegeDefinition definition = new PrivilegeDefinitionImpl(
+                privilegeName, isAbstract,
+                declaredAggregateNames.toArray(new String[declaredAggregateNames.size()]));
+        definitions.put(privilegeName, definition);
+        return definition;
     }
 
 



Mime
View raw message