jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r649575 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java
Date Fri, 18 Apr 2008 15:30:26 GMT
Author: angela
Date: Fri Apr 18 08:30:17 2008
New Revision: 649575

URL: http://svn.apache.org/viewvc?rev=649575&view=rev
Log:
JCR-1104 : JSR 283 support (security work in progress)

remove duplicate check for existing path.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java?rev=649575&r1=649574&r2=649575&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/DefaultAccessManager.java
Fri Apr 18 08:30:17 2008
@@ -19,7 +19,6 @@
 import org.apache.jackrabbit.commons.iterator.AccessControlPolicyIteratorAdapter;
 import org.apache.jackrabbit.core.HierarchyManager;
 import org.apache.jackrabbit.core.ItemId;
-import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.security.authorization.PolicyTemplate;
 import org.apache.jackrabbit.core.security.authorization.AccessControlEditor;
 import org.apache.jackrabbit.core.security.authorization.AccessControlProvider;
@@ -96,7 +95,7 @@
     private WorkspaceAccess wspAccess;
 
     /**
-     * access items for resolution of last persisted item in hierarchy
+     * the hierarchy manager used to resolve path from itemId
      */
     private HierarchyManager hierMgr;
 
@@ -186,7 +185,7 @@
      */
     public void checkPermission(ItemId id, int permissions) throws AccessDeniedException,
ItemNotFoundException, RepositoryException {
         if (!isGranted(id, permissions)) {
-            throw new AccessDeniedException("Not sufficient privileges for permissions :
" + permissions + " on " + hierMgr.getPath(id));
+            throw new AccessDeniedException("Not sufficient privileges for permissions :
" + permissions + " on " + id);
         }
     }
 
@@ -471,12 +470,7 @@
     }
 
     private Path getPath(String absPath) throws RepositoryException {
-        Path path = resolver.getQPath(absPath);
-        NodeId id = hierMgr.resolveNodePath(path);
-        if (id == null) {
-            throw new PathNotFoundException(absPath);
-        }
-        return path;
+        return resolver.getQPath(absPath);
     }
 
     /**



Mime
View raw message