Redirect users to different Service Portals depending Role

AldoConvene
Kilo Expert

Hi Community,

 

Im facing an issue regarding redirection of users depending roles (multiple Service Portals), so I already tried under UI Script SPEntryPage + creating the properties (pointing to this same UI Script)

- glide.entry.page.script     

- glide.entry.first.page.script
 
I tried adding some type of configuration in the UI Script like;
        // if (user.hasRole('admin')) {
        //     return "/?.do";
        // } else if (user.hasRoles() && !redirectURL && !isServicePortalURL) {
        //     return "/sn_sp";
        // } else if (user.hasRole('sn_customerservice.customer') && !redirectURL && !isServicePortalURL) {
        //     return "/csm";
        // } else if (user.hasRoles('thg_snc_external') && !redirectURL && !isServicePortalURL) {
        //     return "/sn_sp";
        // }
 
but does not work. fore some reason, it just take the fiest option if user has role admin. but the other does not work,
DO you guys have an idea on how this can be done without affecting functionality?
 
Thanks!
2 REPLIES 2

Pavithra0812
Tera Expert

@AldoConvene We are facing the same issue, were you able to figure it out?

Pavithra0812
Tera Expert

Hi @AldoConvene we are facing the same issue, were you able to figure it out?