- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 12:08 AM
How to find non admin user in servicenow, he must have permissions to raise Ritm
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2019 03:57 AM
Can you add the log statement in the script include after this line and tell me the log output.
var thisUser = gs.getUser().getUserByID(userID);
gs.log("Group name is "+groupName+"----"+userID);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2019 11:58 PM
Yes asif i checked with a non admin user, if raised a ticket still he can able to edit the varaibles, but his existing ritm forms at varaible section shows readonly mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2019 12:14 AM
Yes asif i checked with a non admin user, if raised a ticket still he can able to edit the varaibles, but his existing ritm forms at varaible section shows readonly mode.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2019 12:58 AM
So is it entering the if condition of your code or not?
What is the output of the client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2019 01:11 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2019 01:30 AM
Hello NAg,
As per the script output, the 2nd line isreturningg true, which means the user with whom you are checking is admin.
g_form.addInfoMessage("Entered into the function" +answer);
g_form.addInfoMessage(g_user.hasRole('admin'));
Kindly recheck again. It should return false for non-admin users.