Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
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
Level 7

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

0 Replies

Avatar

Level 9

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
Level 7

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