Redirecting user

Steve2000
Tera Contributor

Hello,

 

I used the docs regarding to "redirecting user to Service Portal"

I followed the instructions, but when I impersonate a user on my instance, it doesn´t redirect me to the ServicePortal site instead I´m landing on the SOW page. I can´t figure out why this happens.

 

I set the value in the sys_property glide.entry.first.page to new SPEntryPage().getFirstPageURL()

In the Script Include SPEntryPage I changed this.logVariables to "true"

 

If the impersonate user has no roles, he should be redirected to the SP, shouldn´t he?

 

1 ACCEPTED SOLUTION

Hi @Steve2000 ,

If you want  itil users to be redirected to portal then modified condition in script include "SPEntryPage" as below.

if (user.hasRoles() && !user.hasRole("itil") && !redirectURL && !isServicePortalURL)
            return;
 
Please mark my answer as helpful if you find this is helpful.

View solution in original post

11 REPLIES 11

Steve2000
Tera Contributor

I figured out, that when I impersonate another user who I impersonate the first time, that this user will be redirected to the SP. 

So the error has to be the FirstPage line right?

Prince Arora
Tera Sage
Tera Sage

@Steve2000 ,

 

Please check the system property "glide.entry.loggedin.page_ess" if it is not present in your instance, Please create it

 

Filter Navigator <-> sys_properties.LIST <->Find the system property in the name field

 

if it is not present, please create it in the global scope and just mention your portal end point as the value.

 

Create the system property "glide.entry.loggedin.page_ess" if it does not already exist and set the value to "/sp". That should always redirect the ess users to your Service Portal.

 

 

Please mark my answer as helpful + accept it if it works for you!

 

Okay this helps, but what do I have to do, when the user has one or two specific roles?

This user should also start on the SP.

 

When I edit the line 

 

if (user.hasRoles() && !redirectURL && !isServicePortalURL)
            return;
 
he throws the user to the SOW site

 

@Steve2000 ,

 

In that case you need to modify the script include "SPEntryPage()" and function "getFirstPageURL" as mentioned by you in your post

Internally "SPEntryPage" is using the system property "glide.entry.loggedin.page_ess" to land the end user to SP.

 

Please try to play with that script include for more modifications!

 

Please mark the answer correct if your original issue has resolved!