- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2023 06:51 AM
Hi everyone!
I need to give access to a user from a reference field, to a table so he can use the UI Actions to approve/reject.
This reference field is referencing to the whole users on the instance, so I can“t give perimissions to all users.
Only the user selected on this field on a ticket can acces to the modules and the ticket (only the tickets he is selected on this field).
I need this user (and only this user) can access to the ticket...
Any idea of how can I try this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2023 07:05 AM
You'll need to create a Access Control (System Security > Access Control Logs) for whatever role you grant that user. To do this, you need the security_admin role and have to elevate permissions.
I'm assuming you want to grant access to the User table and not the Business approver field. In the Name field on the ACL new record screen, choose your table. (If you want to limit access to a particular field, you'll specify the field in the right-column after choosing your table; if you want them to access all fields, choose the *. I don't believe you can choose a * on sys_user though.) I believe you'll want Type=record and Operation=write. Add your role into the "Requires role" section.
Check out the docs on ACLs here. If you run into issues with access, you can always use the debugger (System Diagnostics > Session Debug > Debug Security). This will show you on which tables/fields access permissions fail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2023 07:09 AM
@Facundo Prado you can script in the condition on ui action
current.<business approver field name> = gs.getUserID();
In script of ACL:
answer =current.<business approver field name> == gs.getUserID();
Please mark as correct answer if this solves your issue.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2023 07:13 AM
Great @jaheerhattiwale!! thanks for answering. I have another question related to this.
How can give access to the module of the tickets? because he needs to get into this modules to acces the ticket.
(We can“t give acces to the role to all useres, only to the user selected in this field)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2023 07:16 AM
@Facundo Prado scripted condition is not possible in modules.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2023 08:09 AM
@Facundo Prado If the information provided is helpful then please close the thread by marking the as correct answer, so that it will help future readers.
Thanks
ServiceNow Community Rising Star, Class of 2023