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

Adding "Restriction" Permissions in code

Avatar

Level 3

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

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

JCR
1 Accepted Solution

Avatar

Correct answer by
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)

 



Arun Patidar

View solution in original post

2 Replies

Avatar

Correct answer by
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)

 



Arun Patidar

Avatar

Level 3

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) 

 

@arunpatidar