jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: r1443943 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: security/authorization/Permission.java version/VersionHistoryImpl.java
Date Fri, 08 Feb 2013 11:26:06 GMT
Author: unico
Date: Fri Feb  8 11:26:06 2013
New Revision: 1443943

URL: http://svn.apache.org/r1443943
Log:
JCR-3507 some tests fell over. it doesn't trivial to add a separate permission for repository
wide version removal policy. need to rethink this.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/Permission.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/Permission.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/Permission.java?rev=1443943&r1=1443942&r2=1443943&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/Permission.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/Permission.java
Fri Feb  8 11:26:06 2013
@@ -57,13 +57,11 @@ public final class Permission {
 
     public static final int PRIVILEGE_MNGMT = WORKSPACE_MNGMT << 1;
 
-    public static final int REMOVE_VERSION = PRIVILEGE_MNGMT << 1;
-
     public static final int ALL = (READ | SET_PROPERTY | ADD_NODE | REMOVE_NODE
             | REMOVE_PROPERTY | READ_AC | MODIFY_AC | NODE_TYPE_MNGMT
             | VERSION_MNGMT | LOCK_MNGMT | LIFECYCLE_MNGMT | RETENTION_MNGMT
             | MODIFY_CHILD_NODE_COLLECTION | NODE_TYPE_DEF_MNGMT | NAMESPACE_MNGMT
-            | WORKSPACE_MNGMT | PRIVILEGE_MNGMT | REMOVE_VERSION);
+            | WORKSPACE_MNGMT | PRIVILEGE_MNGMT);
 
     /**
      * Returns those bits from <code>permissions</code> that are not present
in

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java?rev=1443943&r1=1443942&r2=1443943&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionHistoryImpl.java
Fri Feb  8 11:26:06 2013
@@ -258,7 +258,6 @@ public class VersionHistoryImpl extends 
             RepositoryException {
         try {
             // check permissions
-            checkRemoveVersionPermission();
             checkVersionManagementPermission();
             sessionContext.getSessionImpl().getInternalVersionManager().removeVersion(
                     getSession(),
@@ -275,7 +274,6 @@ public class VersionHistoryImpl extends 
      * @throws RepositoryException if an error occurs.
      */
     public void removeVersionHistory() throws RepositoryException {
-        checkRemoveVersionPermission();
         checkVersionManagementPermission();
         InternalVersionManager internalVersionManager =
                 sessionContext.getSessionImpl().getInternalVersionManager();
@@ -330,10 +328,6 @@ public class VersionHistoryImpl extends 
         }
     }
 
-    private void checkRemoveVersionPermission() throws RepositoryException {
-        sessionContext.getAccessManager().checkRepositoryPermission(Permission.REMOVE_VERSION);
-    }
-
     /**
      * Checks if the given version belongs to this history
      *



Mime
View raw message