- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2024 02:19 AM
Hi Team,
I have written Create/Write/Delete ACls so that only group manager can remove/add users to the group:
I have created 3 table level ACls which is sys_user_grmember.None with Script condition as below:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2024 03:55 AM - edited 03-31-2024 04:00 AM
Hi @Community Alums ,
The create ACL works a little bit differently because we don’t have access to ‘current.group.manager’ before the record is created. Because of this, you need to open up create permissions to the role that your group managers will have. Typically these managers will have the ‘itil’ role anyway so you can just set up your ‘create’ ACL with the ‘itil’ role defined in the related list at the bottom of the ACL.
Opening up the create ACL is necessary for this configuration to work, but needs to be backed up by some additional security in the form of a ‘before’ business rule. The business rule performs a secondary check on insert/update of the group member record to ensure that the user is actually a group manager or has the ‘user_admin’ role. If not, it aborts the insert/update and alerts the user.
Please follow the below steps on your ACL to set Group.manager is dynamic true-
After selecting the above option please select group-->group fields
Now select Manger
Now select is Dynamic me
Put it in all the ACL's for create and write written for the table "sys_user_grmember"
If you want admins to perform all the actions please mark admin Overrides to 'true', this means that the ACL will not apply for the admins.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2024 03:55 AM - edited 03-31-2024 04:00 AM
Hi @Community Alums ,
The create ACL works a little bit differently because we don’t have access to ‘current.group.manager’ before the record is created. Because of this, you need to open up create permissions to the role that your group managers will have. Typically these managers will have the ‘itil’ role anyway so you can just set up your ‘create’ ACL with the ‘itil’ role defined in the related list at the bottom of the ACL.
Opening up the create ACL is necessary for this configuration to work, but needs to be backed up by some additional security in the form of a ‘before’ business rule. The business rule performs a secondary check on insert/update of the group member record to ensure that the user is actually a group manager or has the ‘user_admin’ role. If not, it aborts the insert/update and alerts the user.
Please follow the below steps on your ACL to set Group.manager is dynamic true-
After selecting the above option please select group-->group fields
Now select Manger
Now select is Dynamic me
Put it in all the ACL's for create and write written for the table "sys_user_grmember"
If you want admins to perform all the actions please mark admin Overrides to 'true', this means that the ACL will not apply for the admins.
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2024 05:49 AM
Hi @Community Alums ,
Try Below ACL Script with no role
Create Delete and Write ACL on table level (‘sys_user_grmember’)
check advanced
in script write below
if(typeof parent != 'undefined' && parent.manager == gs.getUserID()){
answer = true; //Allow access if user has 'user_admin' role or is group manager
}else{
answer = false;
}
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda