Group Managers should be able to edit/add group members of their groups and not other groups.

shikhakhann
Tera Contributor

Hi All,

I am trying to enable the functionality where group managers should be able to add/edit members via related list on group record.
I followed these 2 links to build the functionality:
https://servicenowguru.com/system-definition/group-managers-manage-group-members/# 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0723786 

Steps I performed in my instance:
1)Created a custom role.
2)Created 4 ACL as below:
2.1)READ ACL:

shikhakhann_0-1778171688317.png

2.2)WRITE ACL:

shikhakhann_1-1778171724188.png

2.3)DELETE ACL:

shikhakhann_2-1778171774149.png

2.4)CREATE ACL:

shikhakhann_3-1778171823447.png

Result: I impersonated with the user who has this custom role and is manager of a group, he is not able to see EDIT button on the related list:

shikhakhann_4-1778171976791.png

If I change the code in CREATE ACL as follows, then user is able to see EDIT button to all the Groups related list where he is not even the manager.

shikhakhann_5-1778172067589.png

Got this code from this KB https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0723786 

Result: User is able to see EDIT button to all the groups "group members" related lists where he is not even the manager.

shikhakhann_6-1778172233980.png
I have tried many changes in my CREATE ACL and have followed an article which talks about adding the OMIT EDIT Condition and the Business Rule, that also doesn't resolve my issue.

Please suggest!


 



 



1 REPLY 1

Vishal Jaswal
Giga Sage

Hello @shikhakhann 

Try below in the CREATE ACL Script:

(function () {
   
    if (gs.hasRole('u_group_fields_editing')) {
        return true;
    }

    // Direct group manager check
    if (current.group.manager == gs.getUserID()) {
        return true;
    }

    // Parent relationship check (if parent exists)
    if (parent && parent.manager == gs.getUserID()) {
        return true;
    }

    // Explicit deny so other ACLs continue correctly
    return false;

})();

Hope that helps!