jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1406986 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege: PrivilegeInitializer.java PrivilegeManagerImpl.java
Date Thu, 08 Nov 2012 09:59:32 GMT
Author: angela
Date: Thu Nov  8 09:59:32 2012
New Revision: 1406986

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

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeInitializer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeInitializer.java?rev=1406986&r1=1406985&r2=1406986&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeInitializer.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeInitializer.java
Thu Nov  8 09:59:32 2012
@@ -38,7 +38,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * PrivilegeInitializer... TODO
+ * {@code RepositoryInitializer} that asserts the existence and node type of
+ * the /jcr:system/jcr:privileges node that is used to store privilege definitons.
+ * In addition it writes all built-in privilege defintions except jcr:all to
+ * the repository.
  */
 class PrivilegeInitializer implements RepositoryInitializer, PrivilegeConstants {
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeManagerImpl.java?rev=1406986&r1=1406985&r2=1406986&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeManagerImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/privilege/PrivilegeManagerImpl.java
Thu Nov  8 09:59:32 2012
@@ -35,7 +35,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * PrivilegeManagerImpl... TODO
+ * {@code PrivilegeManager} implementation operating on the specified
+ * {@code PrivilegeDefinitionProvider}.
  */
 public class PrivilegeManagerImpl implements PrivilegeManager {
 
@@ -78,7 +79,7 @@ public class PrivilegeManagerImpl implem
     public Privilege registerPrivilege(String privilegeName, boolean isAbstract,
                                        String[] declaredAggregateNames) throws RepositoryException
{
         if (root.hasPendingChanges()) {
-            throw new InvalidItemStateException("Session has pending changes.");
+            throw new InvalidItemStateException("Attempt to register a new privilege while
there are pending changes.");
         }
         if (privilegeName == null || privilegeName.isEmpty()) {
             throw new RepositoryException("Invalid privilege name " + privilegeName);



Mime
View raw message