Redirecting ITIL User to Backend instead Portal

sattar3
Tera Contributor

Hello All,

 

In our instance users are redirecting to portal, now we have requirement that "itil" users must redirect to backend instead portal after login/impersonating.

 

Can someone please help me on this.

 

@Ankur Bawiskar  @Mark Roethof @Aman Kumar S 

 

Thanks.

8 REPLIES 8

Aman Kumar S
Kilo Patron

Hi @sattar3 

First you need to share how exactly are you doing this.

Have you modified the SPEntrypage script inlcude or setup login rules, or modified the system property?

Best Regards
Aman Kumar

Hi @Aman Kumar S ,

 

I tried by updating below changes in my pdi to redirect the portal page to itil user for testing purpose.

 

 getDefaultPortal: function() {
//redirecting itil user to portal
        if (gs.getUser().hasRole('itil')) 
{
gs.log("I'm from line no.34");
            var gr = new GlideRecord("sp_portal");
            gr.addQuery("url_suffix=sp");
            gr.query();
            if (gr.next())
                return "/" + gr.getValue("url_suffix") + "/";
 
            return "/sp/";  
}
 var gr = new GlideRecord("sp_portal");
            gr.addQuery("default", true);
            gr.query();
            if (gr.next())
                return "/" + gr.getValue("url_suffix") + "/";
 
            return "/esc/";  //oob code present in SPEntryPage script include
}
       },
 
Please correct me if i did anything wrong, i can't get the log also.
 
 
Thanks

  if (user.hasRoles() && !redirectURL && !isServicePortalURL)
            return;
Do you see any modification in your pdi in these lines?
 
Also, hasRole check will also allow if you are admin, also apply check if the user is not admin as well.
 
Best Regards
Aman Kumar

@Aman Kumar S  no changes in those lines

if (user.hasRoles() && !redirectURL && !isServicePortalURL)
            return;
 
Do i need to modify the changes there, please share how should i add the direct url for itil users? please help me on this.

 

sattar3_0-1707993591406.png

 

Thanks.