- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2023 04:33 PM
Hello,
I've a requirement that I need to gray-out the Delete options for ITIL users and only the MIM team can delete it. The Delete options is on UI Action -> Global table. If I need to change the permission; should I create an ACL or modify the code in the script?
Thank you,
Lilian
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2023 04:37 PM
Hi Lilian,
To gray-out the Delete option for ITIL users and only allow the MIM team to delete records on a global table, you can create an Access Control List (ACL) in ServiceNow.
Here are the steps you can follow to create an ACL:
Go to "System Security" > "Access Control" > "Create New".
Choose the "Table" option and select the global table where the Delete option is located.
Set the "Operation" to "delete".
Set the "Role" to "MIM team" to allow only members of that team to delete records.
Set the "Condition" to check if the current user has the "itil" role. You can use the following script:
gs.hasRole('itil')
This condition will evaluate to true if the current user has the "itil" role, which will prevent them from seeing the Delete option.
- Save the ACL.
With this ACL in place, ITIL users will not be able to see or use the Delete option, and only members of the MIM team will be able to delete records on the global table.
Note that modifying the code in the script is not recommended, as it can have unintended consequences and may cause issues with future upgrades or customizations. Using ACLs is the recommended way to control access to ServiceNow functionality.
Please mark my answer correct/helpful in case it adds value and moves you a step closer to your desired ServiceNow solution goal.
Thanks,
Punit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2023 04:37 PM
Hi Lilian,
To gray-out the Delete option for ITIL users and only allow the MIM team to delete records on a global table, you can create an Access Control List (ACL) in ServiceNow.
Here are the steps you can follow to create an ACL:
Go to "System Security" > "Access Control" > "Create New".
Choose the "Table" option and select the global table where the Delete option is located.
Set the "Operation" to "delete".
Set the "Role" to "MIM team" to allow only members of that team to delete records.
Set the "Condition" to check if the current user has the "itil" role. You can use the following script:
gs.hasRole('itil')
This condition will evaluate to true if the current user has the "itil" role, which will prevent them from seeing the Delete option.
- Save the ACL.
With this ACL in place, ITIL users will not be able to see or use the Delete option, and only members of the MIM team will be able to delete records on the global table.
Note that modifying the code in the script is not recommended, as it can have unintended consequences and may cause issues with future upgrades or customizations. Using ACLs is the recommended way to control access to ServiceNow functionality.
Please mark my answer correct/helpful in case it adds value and moves you a step closer to your desired ServiceNow solution goal.
Thanks,
Punit