Hide portal pages for specific user

rajasekar reddy
Tera Contributor

Hi experts,

can we hide portals pages/widgets for specific users or roles?

 

We need to show only Requests page to users and hide everything else. How can we achieve this?

nov1.png

5 REPLIES 5

AnubhavRitolia
Mega Sage
Mega Sage

Hi @rajasekar reddy 

 

You can hide and show Portal Widgets and Pages using User Criteria. But it will be time consuming as you may have to do it for all Pages or Widgets or collection of both.

 

Please refer below links:

 

 

Please refer below links:

https://docs.servicenow.com/bundle/rome-servicenow-platform/page/build/service-portal/concept/user-c...

 

https://docs.servicenow.com/en-US/bundle/rome-servicenow-platform/page/build/service-portal/task/wid...

 

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023

Balaram7
Kilo Sage

Hi Rajasekar reddy,

 

if you want to hide menu items, 

Navigate to Service portal => menus.

And open the portal page you are using.

For every widget you want to hide add the Condition gs.getUser().hasRole('itil') for every menu item except for Requests.

And check for the requests if there are any conditions defined and remove that.

I hope this will helpful for your requirement to analyze and fix the issue, if so please

Mark this solution as helpful or correct answer.

 

Thank you,

Balaram.

Manal  AQUIL
Tera Contributor

@rajasekar reddy 
1. Search Menus in the left navigation under Service Portal  (Open SP Header Menu record ).

2. Deactivate records form the menu item-related list which you want to hide from the portal.

 

Please Mark Helpful, if it helps you

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

You can use the role field on widget and pages to hide it from all user apart from roles:-

 

Saurav11_0-1667312808918.png

 

Saurav11_1-1667312852234.png

 

Please mark my answer as correct based on Impact.