Issue with Impersonate( Non-fulfiller are able to see the fulfiller view)

Gayatri0506
Tera Contributor

Hi Team 
when we are impersonating with non-fulfiller user it's redirecting to portal page but if that user getting the link of fulfiller view non-fulfiller user are able to see the fulfiller view as well. Anyone have any idea that will be helpful how can I restrict that non-fulfiller user can't see the fulfiller view.

1 ACCEPTED SOLUTION

Karthiga S
Kilo Sage

Hi @Gayatri0506 

 

  1. Identify the roles required to access the fulfiller view. Typically, these roles might include itil, admin, or other custom roles.
  2. Implement a  UI Script to restrict access to the fulfiller view based on the user's roles. This script should check the user's roles and redirect them to a different page if they do not have the necessary roles.
  3. Test the changes by impersonating the non-fulfiller user and attempting to access the fulfiller view.

 

addLoadEvent(function()
{
    if(!g_user.hasRoleExactly('itil') && document.URL.indexOf('.do')!= -1)
  {
   window.location='/sp';
   }
  else
  {return}

});


Please replace '/sp' with the URL of the page you want to redirect non-fulfiller users to.

Please mark it Correct and Hit Like if you find this helpful!

 

Regards,

Karthiga

View solution in original post

1 REPLY 1

Karthiga S
Kilo Sage

Hi @Gayatri0506 

 

  1. Identify the roles required to access the fulfiller view. Typically, these roles might include itil, admin, or other custom roles.
  2. Implement a  UI Script to restrict access to the fulfiller view based on the user's roles. This script should check the user's roles and redirect them to a different page if they do not have the necessary roles.
  3. Test the changes by impersonating the non-fulfiller user and attempting to access the fulfiller view.

 

addLoadEvent(function()
{
    if(!g_user.hasRoleExactly('itil') && document.URL.indexOf('.do')!= -1)
  {
   window.location='/sp';
   }
  else
  {return}

});


Please replace '/sp' with the URL of the page you want to redirect non-fulfiller users to.

Please mark it Correct and Hit Like if you find this helpful!

 

Regards,

Karthiga