Access rights for folders based on users | Community
Skip to main content
Prashardan
Level 4
October 12, 2024
Solved

Access rights for folders based on users

  • October 12, 2024
  • 1 reply
  • 469 views

Hi Team

 

I have requirement where based on logged in user I want to restrict folder creation and content fragment creation.

 

Requirement is:

I have two user groups authors and reviewers.

Authors can create content fragment but should not create and delete folders under /content/dam/aaa/bbb

Reviewers can create and delete folders but should not create content fragments under path /content/dam/aaa/bbb

 

I have written servlet to identify the user groups.

Also using repo scripts I am able to restrict create button but unable to achieve folder and content fragment restriction.

 

Kindly advise.

 

Thanks in advance.

 

Best answer by lukasz-m

Hi @prashardan,

I think you could create custom render condition, which base on context will either show/hide specific element from Create menu like Content Fragment, Folder etc.

In other words your custom render condition will include entire logic related to group membership.

To add custom render condition you will have to overlay specific path for each action, e.g Content Fragment creation action button can be found under:

  • /libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/createfragment

Below article describes step by step how to implement and use custom render condition - so you can follow it.

1 reply

lukasz-m
Community Advisor
lukasz-mCommunity AdvisorAccepted solution
Community Advisor
October 14, 2024

Hi @prashardan,

I think you could create custom render condition, which base on context will either show/hide specific element from Create menu like Content Fragment, Folder etc.

In other words your custom render condition will include entire logic related to group membership.

To add custom render condition you will have to overlay specific path for each action, e.g Content Fragment creation action button can be found under:

  • /libs/dam/gui/content/assets/jcr:content/actions/secondary/create/items/createfragment

Below article describes step by step how to implement and use custom render condition - so you can follow it.