- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 10:50 AM
I am trying to find all ACLs that require a specific role, but I don't know where the data is stored. When I look at the ACL form, the Roles condition uses an embedded list. Does anyone know where I can find the data to run a query on it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 11:14 AM
Hi @gjz ,
You can find all the acl's that require a specific role by gliding through 'sys_security_acl_role' table.
here is the example script to find all the acl's that needs itil role:
var aclRoles=new GlideRecord('sys_security_acl_role');
aclRoles.addEncodedQuery('sys_user_role.name=itil');
aclRoles.query();
count=0;
while(aclRoles.next()){
count+=1;
}
gs.log("count of acl's that requires itil rol are : "+count);
Hope this helps, if the solution worked for you plz Accept the Solution and Mark it as Helpful so it could benefit fellow devs. Thank you!
Regards,
Muhammad Arafath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 10:56 AM
You can create a list report that has related list conditions. That would help you select ACLs that have a relationship to a role. HOWEVER sys_security_acl isn't reportable OOB. You'd need to create an ACL to make that table reportable.
From there, this video can show you how the related list conditions work.
https://youtu.be/gkzKzSXbwk0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 11:14 AM
Hi @gjz ,
You can find all the acl's that require a specific role by gliding through 'sys_security_acl_role' table.
here is the example script to find all the acl's that needs itil role:
var aclRoles=new GlideRecord('sys_security_acl_role');
aclRoles.addEncodedQuery('sys_user_role.name=itil');
aclRoles.query();
count=0;
while(aclRoles.next()){
count+=1;
}
gs.log("count of acl's that requires itil rol are : "+count);
Hope this helps, if the solution worked for you plz Accept the Solution and Mark it as Helpful so it could benefit fellow devs. Thank you!
Regards,
Muhammad Arafath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 11:21 AM
Thank you! I can't believe I didn't think of looking for a table name that would hold the data. This worked perfectly.