Hiding menu items for SP header in Service Portal

zct
Kilo Explorer

Hi All,

I have a requirement to hide some menu items in Service Portal to some portal users who does not have access.

I was thinking of controlling by role/group.

E.g. User A login to Portal and is not authorized to see Dashboard menu item, thus he can only see Homepage

User B login to Portal and is authorized to see Dashboard menu item, thus he can see both Dashboard and Homepage

find_real_file.png

Does anyone has a sample script to do this?

Thank you in advance for your help.

1 ACCEPTED SOLUTION

Alikutty A
Tera Sage

zct



You should tag a condition to your menu item for dashboard. Open the menu item and add this condition.



gs.hasRole('itil')



find_real_file.png



This will hide the menu items for users who don't have itil role or from end users. Let me know if this worked for you



Thank You


Please Hit Like, Helpful or Correct depending on the impact of response


View solution in original post

6 REPLIES 6

Alikutty A
Tera Sage

zct



You should tag a condition to your menu item for dashboard. Open the menu item and add this condition.



gs.hasRole('itil')



find_real_file.png



This will hide the menu items for users who don't have itil role or from end users. Let me know if this worked for you



Thank You


Please Hit Like, Helpful or Correct depending on the impact of response


Hi alikuttyka ,



Thanks for the help.



It works. I am exploring of using groups to control access by using gs.getUser().isMemberOf('Company-DashboardGroup'). However, it is not exposing the menu to users who is member of the group: Company-DashboardGroup can you give me some advise on this.



Thank you.


When I tried it worked for me, Please make sure your group name is correct.



gs.getUser().isMemberOf('Service Desk');




Thank You


Please Hit Like, Helpful or Correct depending on the impact of response


Hi Team,

I have a header menu item called my items under that 2 child menu items called My open items and My closed items like below:

on clicking "My items" should redirected to "itservices_my_items" Page, I tried keeping in URL and pages but not working.

 

My items menu is not redirecting to anywhere as of now. Please help me how to configure for redirecting to itservices_my_items page on clicking menu item.

FYI : My Open items and My closed items and working as expected and redirecting to proper URL.

Thanks,

Poojitha B Nagaraj