cancel
Showing results for 
Search instead for 
Did you mean: 

Allow only one usergroup to change component content

Former Member
0 Kudos

I want to restrict only a specific usergroup to edit and change some component content. How do I achieve this ? Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Saurabh,

you can modify access rights according to your needs with the following impex:

 $START_USERRIGHTS
 Type;UID;MemberOfGroups;Password;Target;read;change;create;delete;change_perm
 UserGroup;YOURGROUP;
 ;;;;CMSParagraphComponent;+;+;+;+;-
 ;;;;CMSParagraphComponent.content;+;+;;;
 $END_USERRIGHTS

Explanation:

"$START_USERRIGHTS" and "$END_USERRIGHTS" are kind of "magic macros" which are exsistent out of box.

The first data line "UserGroup;YOURGROUP;" 'tells' the script that the following lines belong to the user group with uid "YOURGROUP".

The line ";;;;CMSParagraphComponent;+;+;+;+;-" then grants read, change, create and delete permission for the type "CMSParagraphComponent" to the group.

The line ";;;;CMSParagraphComponent.content;+;-;;;" grants read permission and restricts change of the attribute "content". Rights for "create", "delete" and "change_perm" are inherited in this line.

With this snippet you should be able to:

  1. Deny access to specific types, attributes for specific usergroups

  2. Grant e.g. change permission to specific types and attributes for particular groups.

hope this helps.