create a read ACL without providing role to group
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â01-15-2024 08:11 PM
Is there a way to create read ACL on Project tables for a particular group ABC without giving the group any role so that they have can view projects from dashboard and application module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â01-15-2024 08:15 PM
Hi @Cindy Sim
yes this is possible. Instead of selecting any roles in the ACL enter into the script field something like that
answer = gs.getUser().isMemberOf('REPLACE WITH YOUR GROUP NAME');
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â01-16-2024 01:46 PM
thanks for reply. I have above script on my ACL the user in that group are able to view the projects but do not have access to some reports on dashboards. I need ACL that provides access to all the reports on dashboard. and when user click on the report it would take them to respective table without having to add any role to the group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â01-16-2024 09:03 PM
Hi @Cindy Sim
When it comes to Reports and Dashboards, it's necessary to share them with the Group to grant them the ability to view it.
Additionally, we should have an ACL report_view with the same script as Maik.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â01-17-2024 12:11 AM - edited â01-17-2024 12:12 AM
Yes, you can create a read Access Control List (ACL) on Project tables for a particular group without giving the group any role. Here are the steps:
1. Navigate to "System Security > Access Control (ACL)" in ServiceNow.
2. Click on "New" to create a new ACL.
3. In the "Name" field, enter a name for the ACL.
4. In the "Type" field, select "Record".
5. In the "Operation" field, select "Read".
6. In the "Admin Overrides" field, select "No".
7. In the "Table" field, select the Project table.
8. In the "Requires Role" field, leave it blank.
9. In the "Advanced" field, write a script that checks if the user is a member of the group ABC. Here is a sample script:
javascript
(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('user', gs.getUserID());
gr.addQuery('group', 'ABC'); // Replace 'ABC' with the sys_id of the group
gr.query();
return gr.hasNext();
})(current, previous);
10. Click on "Submit" to create the ACL.
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - nowgpt.ai