Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
I have a case where I need to check for a session if individual privileges are available for a specific node. For performance reasons I want to avoid to execute multiple calls to accessControlManager.hasPrivilege(...), but get all Privileges of that node once and the set various flags based on the presene of certain privileges or not.
I want to use something like this:
Set<String> applicablePrivilegeNames = ...(accessControlManager.getPrivileges(path))... boolean canAddChildNodes = applicablePrivilegeNames.contains(Privilege.JCR_ADD_CHILD_NODES); boolean canWrite = applicablePrivilegeNames.contains(Privilege.WRITE);
It should work with aggregates as well.
Right now it's a bit problematic because privilege.getName() resolves to something like jcr:read, while the value of Privilege.JCR_READ is {http://www.jcp.org/jcr/1.0}read
Attachments
Attachments
Issue Links
- causes
-
OAK-9555 javadoc error due to bracket mismatch
- Closed