- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 06:41 AM
Hi,
I have only given access to service portal to my users and have not given them itil role but still users after they click on 'back' twice in the service portal are able to reach the backend servicenow.How to stop this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 07:36 AM
You need to delete the script.
If you want it specific for Roles you can use below.
addLoadEvent(ESSUserRedirectSP);
function ESSUserRedirectSP() {
if(g_user.userName != "guest"){
if(!g_user.hasRoles()){ //This works for users with no role
var topurl = getTopWindow().location.toString();
var url = "https://" + window.location.host + "/portal_name";
top.window.location = url;
}
}
}
}
}
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2018 07:48 AM
Yes I know but for deleting the script the admin needs to have access to the backend.I cant delete it from my service portal.I think the below code should be removed.It is a risk
if(g_user.userName != "guest")