Adding "Restriction" Permissions in code | Community
Skip to main content
May 25, 2021
Solved

Adding "Restriction" Permissions in code

  • May 25, 2021
  • 1 reply
  • 1574 views

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.

 

 

Appreciate your help on this.


Thank you

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

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)

 

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
May 25, 2021

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
harishredAuthor
May 26, 2021

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