Gliderecord in scripts don't obey ACLs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2016 05:32 AM
Hey All,
It seems GlideRecord when used in scripts doesn't respect ACLs? So a script can grab some information, that the user its running as doesnt have access to.
is this expected?
Thanks,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2016 05:45 AM
Hi Chris,
No, The first time when code/scripts runs it checks that is there any acl defined for that table ? if yes then it checks further that whether user is having a access to the row/column of that table. if user passes the qualification given in the acls it executes else it returns false.
Hope this helps.
Regards,
Atul Kumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2016 01:31 PM
Hi Chris,
You should use GlideRecordSecure.
GlideRecordSecure is a class inherited from GlideRecord that performs the same functions as GlideRecord, and also enforces ACLs. Like GlideRecord, GlideRecordSecure is an object that contains zero or more records from one table. Another way to say this is that GlideRecordSecure is an ordered list that is used for database operations instead of writing SQL queries. GlideRecordSecure:
- supports reference elements
- is used for securing script includes
More info here.
http://wiki.servicenow.com/index.php?title=GlideRecordSecure#gsc.tab=0