Expand my Community achievements bar.

repository initiation script: Deny create and delete folder under dam path

Avatar

Level 4

Hi Team

I have a requirement wherein I need to deny create folder and delete folder option under certain path like /content/dam/project1/subproject1.

 

I want to achieve this using repository script.

 

Please advise

2 Replies

Avatar

Community Advisor

@Prashardan 

You can use below repo init script to deny create folder and delete folder option under certain path

{
  "scripts": [
    "set ACL on /content/dam/specific-folder\n    allow jcr:read by everyone\n    allow rep:write by everyone\n    deny jcr:addChildNodes on sling:Folder by everyone\n    deny jcr:removeNode on sling:Folder by everyone\n end"
  ]
}

Avatar

Level 4

Hi @AMANATH_ULLAH 

 

Thanks for your reply.


I have tried the script you have provided but it is completing removing create button.

 

I am using the below script.

 

set ACL on /content/dam/project/subproject1
deny jcr:addChildNodes on sling:Folder by group1
end

 

I want only create folder option to be deleted/hidden.

Prashardan_1-1724393754978.png

Kindly advise