how to hide all hr cases from impersonators
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-25-2017 11:41 AM
OK so was working on an HR roll out today and it occured to me, I don't want to disable impersonating hr people <they may have an issue in Service Now that i need to impersonate to test> but i don't want anyone impersonating an hr person to be able to see any hr cases <that would be VERY bad...
so since i had a before BR that ran on query and locked down who can see which cases, I thought to myself why not use THAT br to restrict the view of cases... this little function in an on query BR on the table will keep anyone that is impersonating from seeing any cases.
Please let me know if you see any flaw in my logic. Active is the task active field so as a boolean has to be either true or false.
if(GlideImpersonate().isImpersonating()){ | |
//if someone is impersonating hide all records | |
gs.addErrorMessage("You are impersonating an HR user and are unable to view HR Cases"); | |
current.addQuery('active',false); | |
current.addQuery('active',true); |
}
- Labels:
-
HR Service Delivery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2018 11:51 AM
this works like wonders