Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Where the Permission data gets stored in CRXDE.

Avatar

Level 7

Hi

akshaybhujbale_0-1658894825366.png

I want to retrieve permission data. Can I get to know where this data stored in CRXDE 

so that I can get it.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Permission data is stored in rep:policy nodes. For eg: you have given jcr read access of /content/<your-site> to "read-service" user and write access to "write-service". Then go to /content/<your-site>

click rep:policy, you will find allow nodes, check for rep:privileges

 

HeenaMadan_1-1658910738155.png

 

HeenaMadan_2-1658910847857.png

Thanks,

Heena

View solution in original post

3 Replies

Avatar

Community Advisor

Permission data is stored in rep:policy nodes. So for example you give permission to a node /content/a for user test then a rep:policy node will be created under /content/a having a child node allow/deny containing user name as rep:principalName, rep:privileges as type of permission.

For Example :

sachinarora_0-1658896564106.png

 

Below are the details of API that you can refer : 

 

Sample Code :

UserManager userMgr = ((org.apache.jackrabbit.api.JackrabbitSession) session).getUserManager();
AccessControlManager accessControlManager = session.getAccessControlManager();
Authorizable authorizable  = userMgr.getAuthorizable(groupName);
AccessControlPolicyIterator policyIterator = accessControlManager.getApplicablePolicies(nodePath);

Avatar

Correct answer by
Community Advisor

Permission data is stored in rep:policy nodes. For eg: you have given jcr read access of /content/<your-site> to "read-service" user and write access to "write-service". Then go to /content/<your-site>

click rep:policy, you will find allow nodes, check for rep:privileges

 

HeenaMadan_1-1658910738155.png

 

HeenaMadan_2-1658910847857.png

Thanks,

Heena