Restrict entire service portal to selected users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2017 05:04 PM
I'm trying to restrict certain users from certain portals. Does anyone know how to achieve this, as I've looked into user criteria however one cannot use this functional at the portal level. And ideally if the user doesn't have permission to this portal redirect them to another portal.
And is user criteria for service portal only available to Jakarta?
- Labels:
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2017 05:54 PM
So for the licensing - call your rep and ask. Never believe the posts and everybody's contract is different.
So script includes - SPEntryPage - controls redirection to Portal or desktop view.
In that script, we are checking for the User's country and if restricted, redirecting them to a different Portal named /sorry. That just had a page that says coming soon to your country. This would be all you need to redirect them, but it doesn't prevent them from changing the URL and getting to your real portal, hence the role.
var SPEntryPage = Class.create();
SPEntryPage.prototype = {
initialize: function() {
this.logVariables = false; // for debugging
var country = gs.getUser().getCountry();
gs.log('User country '+country);
//***Any changes to the list needs to be changed in onAfter LDAP transform map
if (country == 'AT' || country == 'BE'){
this.portal = "/sorry/";
}
else{
this.portal = "/sp/";
}
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-14-2017 04:40 PM
Hi scottl, please have a look at Service Portal Separation & Redirection solution which i have developed for this purpose.
Cheers
Syed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2018 09:45 AM
I tried the same but url shows "www.xxxyy.service-now.com/undefined" ..in javascript executor am able to get the right service portal url suffix picked
let me know what i am missing in sf.portal.redirect UI script.
Below is the script :
function invokeRedirector(){
var portal=localStorage.getItem('custUrl');
var pageURI = window.location.toString();
var redPage="/portal_redirect.do";
var custUrl;
if(pageURI.indexOf('sp')==-1){
console.log('portal' +portal);
if(!portal){
localStorage.setItem("returnUrl", pageURI);
window.location=redPage;
}
else if(pageURI.indexOf("/"+portal+"?")==-1 &&
pageURI.substr(pageURI.length - portal.length)!=portal){
if(pageURI.indexOf('?')!=-1){
custUrl=portal+pageURI.substring(pageURI.indexOf('?'));
window.location="/"+custUrl;
}
else
{
custUrl=portal;
window.location="/"+custUrl;
}
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2024 11:42 AM
@syed_faheem Can you provide an updated link to your solution. The link here takes me to the Community home page.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2024 07:03 AM