jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-2015) PermissionStore doesn't reflect dynamic nature of jcr:all
Date Tue, 05 Aug 2014 13:52:13 GMT

    [ https://issues.apache.org/jira/browse/OAK-2015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14086281#comment-14086281
] 

angela commented on OAK-2015:
-----------------------------

linking this issue to OAK-1448 as the tool should be used to detect and fix this problem in
existing oak repositories.

> PermissionStore doesn't reflect dynamic nature of jcr:all
> ---------------------------------------------------------
>
>                 Key: OAK-2015
>                 URL: https://issues.apache.org/jira/browse/OAK-2015
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0
>            Reporter: angela
>            Assignee: angela
>             Fix For: 1.1, 1.0.5
>
>
> the following test will fail with the current implementation of the permission store:
> {code}
> @Test
>     public void testJcrAllWithCustomPrivileges() throws Exception {
>         Node testNode = session.getRootNode().addNode("test");
>         String testPath = testNode.getPath();
>         AccessControlUtils.grantAllToEveryone(session, testPath);
>         session.save();
>         JackrabbitAccessControlManager acMgr = (JackrabbitAccessControlManager) session.getAccessControlManager();
>         Privilege[] allPrivileges = AccessControlUtils.privilegesFromNames(session, Privilege.JCR_ALL);
>         Set<Principal> principalSet = ImmutableSet.<Principal>of(EveryonePrincipal.getInstance());
>         assertTrue(acMgr.hasPrivileges(testPath, principalSet, allPrivileges));
>         org.junit.Assert.assertArrayEquals(allPrivileges, acMgr.getPrivileges(testPath,
principalSet));
>         privilegeManager.registerPrivilege("customPriv", false, null);
>         assertTrue(acMgr.hasPrivileges(testPath, principalSet, allPrivileges));
>         org.junit.Assert.assertArrayEquals(allPrivileges, acMgr.getPrivileges(testPath,
principalSet));
>     }
> {code}
> the issue is caused by the current implementation of the PermissionStore and the PermissionStoreEditor,
which do not reflect the dynamic nature of jcr:all upon reading/writing entries from the permission
store.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message