- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 03:54 AM
I need to hide an icon link widget based on role, for ex. if user has abc role he should not see the icon link widget but if he has xyz role he should see it
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 04:57 AM
See this article on how to activate user criteria for Service Portal:
https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/build/service-portal/concept/user-criteria.html
Please read it through before activating
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 04:00 AM
Depending if you have the property "glide.service_portal.user_criteria_enabled" enabled, which gives you user criteria for portal pages and widgets. If not, then there is a field called "Roles" on the widget, in where you can add the role required to see the widget.
But I would properly set it on the instance instead.. You can also use the field "Roles" there to apply the role, or if you have the user criteria, set it accordingly.
Best regards,
Sebastian Laursen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 04:05 AM
Hello,
You can right ctrl + right click on the icon widget on Portal Na click on the Instance option
Then click on three dots and click on Open in Platform
There in the behaviour tab you will see the role option where you can add the roles and restrict it
Please mark answer correct/helpful based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 04:35 AM
Hello,
adding a role here would make this widget visible to users with that role, but what if i want to put a check that certain users with xyz role should not see this widget. I.e i want to hide it only from users having xyz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 04:52 AM
Hello,
Then just create a user criteria.
After creating go to the m2m_sp_instance_uc_can_view table and click on new record and add the Widget instance and the user criteria
To get the Instance name of the widget ctrl + right click on the icon widget on Portal and click on the Instance option
There in the title you will see the name for the instance:-
Please mark answer correct/helpful based on Impact