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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Adding "Restriction" Permissions in code

harishred
Level 2
Level 2

Hello, 

 

We are moving all of the permissions in to code and i am stuck with the syntax for Restriction node (for a deny to delete).. I have added below in /ui.apps/src/main/content/jcr_root/apps/website/config.stage/org.apache.sling.jcr.repoinit.RepositoryInitializer-custom.config:

 

create group stage-site-author
set ACL for  stage-site-author
allow jcr:versionManagement, jcr:modifyProperties, jcr:read, jcr:addChildNodes, jcr:lockManagement, jcr:nodeTypeManagement on /content/site/en/

end

 

But how to add the rep:glob="*/jcr:content*" as shown below.

 

Screen Shot 2021-05-12 at 2.36.30 PM.png

 

Appreciate your help on this.


Thank you

ACL ACL permissions JCR repoinit
1 Accepted Solution
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Please check https://sling.apache.org/documentation/bundles/repository-initialization.html

 

# empty rep:glob means "apply to this node but not its children" # (requires o.a.s.jcr.repoinit 1.1.8)

allow jcr:something on /jcr:content restriction(rep:glob)

 

View solution in original post

2 Replies
Arun_Patidar
Correct answer by
Community Advisor
Community Advisor

Please check https://sling.apache.org/documentation/bundles/repository-initialization.html

 

# empty rep:glob means "apply to this node but not its children" # (requires o.a.s.jcr.repoinit 1.1.8)

allow jcr:something on /jcr:content restriction(rep:glob)

 

View solution in original post

harishred
Level 2
Level 2

Thank you, i already saw this article but how can i apply it on a certain path rather the whole jcr:content? is it like this:

 

allow jcr:removeChildNodes, jcr:removeNode, jcr:addChildNodes, jcr:nodeTypeManagement on /content/we-retail/us/en/community restriction(rep:glob) 

 

@Arun_Patidar