Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 28654 invoked from network); 18 Apr 2008 15:30:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Apr 2008 15:30:54 -0000 Received: (qmail 72779 invoked by uid 500); 18 Apr 2008 15:30:52 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 72747 invoked by uid 500); 18 Apr 2008 15:30:52 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 72721 invoked by uid 99); 18 Apr 2008 15:30:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Apr 2008 08:30:52 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Apr 2008 15:30:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 89FD91A9832; Fri, 18 Apr 2008 08:30:26 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@jackrabbit.apache.org From: angela@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080418153026.89FD91A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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); } /**