- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2017 01:59 AM
Morning All,
Can anyone confirm if there is a way to exclude impersonated sessions from being affected by certain business rules?
So i have a bunch of before query business rules set up to restrict the access of various users to various tables. The one i have on the user table is causing me problems when impersonating someone who is covered by the business rule.
This rule basically says, if the user belongs to a company that is marked as 'retail' then only return them users that belong to their company or a company that is a child of their company. The trouble i'm having is that when i impersonate one such user i can't re-impersonate myself, i get the error below and i have to re-login to the instance to get back to my account.
'java.lang.NullPointerException Check logs for error trace or enable glide.rest.debug property to verify REST request processing'
I tried amending the rule to only run if the user is a retail user and does not have the admin role but the impersonation masks my admin role. It's not a major issue but it's pretty annoying!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2017 02:09 AM
Try adding this condition to your business rule and you should be good.
JSUtil.nil(gs.getImpersonatingUserName())
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2017 02:09 AM
Try adding this condition to your business rule and you should be good.
JSUtil.nil(gs.getImpersonatingUserName())
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2017 02:30 AM
Beautiful! Thanks Kalaiarasan, it works like a charm
