Return-Path: X-Original-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D6DF2D34A for ; Fri, 17 May 2013 16:37:37 +0000 (UTC) Received: (qmail 94743 invoked by uid 500); 17 May 2013 16:37:38 -0000 Delivered-To: apmail-jackrabbit-oak-commits-archive@jackrabbit.apache.org Received: (qmail 94716 invoked by uid 500); 17 May 2013 16:37:38 -0000 Mailing-List: contact oak-commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-commits@jackrabbit.apache.org Received: (qmail 94708 invoked by uid 99); 17 May 2013 16:37:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 May 2013 16:37:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 May 2013 16:37:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7E7D223889E2; Fri, 17 May 2013 16:37:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1483906 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java Date: Fri, 17 May 2013 16:37:16 -0000 To: oak-commits@jackrabbit.apache.org From: angela@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130517163716.7E7D223889E2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: angela Date: Fri May 17 16:37:16 2013 New Revision: 1483906 URL: http://svn.apache.org/r1483906 Log: OAK-527: permissions (tests) Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java?rev=1483906&r1=1483905&r2=1483906&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java (original) +++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/security/authorization/AccessControlManagementTest.java Fri May 17 16:37:16 2013 @@ -42,6 +42,21 @@ import org.junit.Test; public class AccessControlManagementTest extends AbstractEvaluationTest { @Test + public void testReadAccessControlContent() throws Exception { + // test access to ac content if the corresponding access controlled + // parent node is not accessible. + allow(path, privilegesFromName(Privilege.JCR_READ_ACCESS_CONTROL)); + deny(path, privilegesFromName(Privilege.JCR_READ)); + + // the policy node however must be visible to the test-user + assertTrue(testSession.nodeExists(path + "/rep:policy")); + assertTrue(testSession.propertyExists(path + "/rep:policy/jcr:primaryType")); + + assertFalse(testSession.nodeExists(path)); + assertFalse(testSession.propertyExists(path + "/jcr:primaryType")); + } + + @Test public void testAccessControlPrivileges() throws Exception { /* grant 'testUser' rep:write, rep:readAccessControl and rep:modifyAccessControl privileges at 'path' */