Hide New Button on Group table for all the users expect CMDB and ITSM group and user with admin role

Aryan
Tera Contributor

Hi All,

 

We have to hide the NEW button on sys_group table for all the user with knowledge_admin roles and etc.

 

We want the NEW to visible only the admin users and CMDB and ITSM group.

 

Can anyone help me on this?

3 REPLIES 3

Abhishek_Thakur
Mega Sage

Hello @Aryan ,

Utilize the condition field in UI action form and enter the below script.

Note: - Please enter the sys_id in the brackets of the particular groups.

gs.getUserID().isMemberOf("sys_id of admin group")||gs.getUserID().isMemberOf("sys_id of ITSM group")||gs.getUserID().isMemberOf("sys_id of CMDB group");

 

Please mark my answer as accepted solution and give thumbs up, if it helps you.

 

Regards,

Abhishek Thakur

Hi @Abhishek_Thakur ,

 

Thank you for your reply,

But I am unable to find the NEW UI action on sys_group table? where can I can find the NEW button can you help me on this.

Hello @Aryan ,

I thin there is a typo error.. sys_group is not table, table name is sys_user_group. Where you can easily find the NEW UI action.

 

Please mark my answer as accepted solution and give thumbs up, if it helps you.

 

Regards,

Abhishek Thakur