Check canRead() on record for someone besides current user?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 06:37 AM
I'm currently working in a scoped application where I want to check a user's access for a particular record in a business rule. I've been able to use canRead() for myself as a user, but I want to be able to check the same record on behalf of another user. I would use the user record provided by the 'assigned_to' field. Anything within the Global scope can't be used unfortunately because of errors(GlideSecurityManager is not allowed in scoped applications, gs.getSession().impersonate is out of date) . My instance is currently in London, and I'm working in both London and Madrid instances. Has anyone had experience in trying to do this? My only other option I can think of right now is to get the roles from the user, and evaluate the read ACL directly by checking the roles and perhaps the script if possible. I'd like to see if there is something simpler that I'm not aware of. Any help would be appreciated, thanks!
-Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 08:17 AM
Current user, depending on what ACL returs for them, its the same thing as canRead() or canWrite()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 08:22 AM
That's what I thought, I'm looking for a lookup based on another user. In this case, my user on the 'assigned_to' field.