The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Redirect users to SOW if they have business_stakeholder role

Alon Grod
Tera Expert

Hi,

 

If the user has roles itil or business_stakeholder, he needs to redirect to backend homepage when he logged in. I gave Abel Tuter the business_stakeholder role and when he logged in it says show that the url is:

my_instance_url/now/sow/home

 

 

and it shows:

403: You do not have permissions to access this page.

 

how can I fix this?

5 REPLIES 5

Ranjit Nimbalka
Mega Sage

Tushar
Kilo Sage
Kilo Sage

Hi @Alon Grod 

 

I think there might be an ACL or other restrictions on the page (/now/sow/home) preventing users with certain roles from accessing it.

  • Can you please search for any ACLs related to the /now/sow/home page.
  • Also, check that the roles business_stakeholder is allowed to access this page or resource. If not, you may need to modify or create an ACL for the page to allow these roles.

Thanks.

@Tushar  @Ranjit Nimbalka 

I have the sys_property glide.login.home to be set to /now/sow/home.

I need that users with business_stakeholder role will be redirect to dashboard page in native ui.

I tried to adjust the SPEntryPage script include and I added this:

if(user.hasRoles('busines_stakeholder')){
 gs.log('abel');
 var instanceURL = gs.getProperty("glide.servlet.uri");
 return instanceURL + "now/nav/ui/classic/params/target/%24pa_dashboards_overview.do";
}



The problem is that Im not getting the log and users always refer to now/sow/home

Tushar
Kilo Sage
Kilo Sage

Hi @Alon Grod 

 

can you please try with below 

 


    // Check if the user has the business_stakeholder role
    if (gs.getUser().hasRole('business_stakeholder')) {
        gs.log('User is a business stakeholder, redirecting to the dashboard...');
        
        // Get the instance URL
        var instanceURL = gs.getProperty("glide.servlet.uri");
        
        // Return the URL for the dashboard page in the classic UI
        return instanceURL + "now/nav/ui/classic/params/target/%24pa_dashboards_overview.do";
    }

    // If the user doesn't have the role, proceed with the default behavior
    return gs.getProperty("glide.login.home"); // This will redirect to /now/sow/home by default

 

  

Thanks.