- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2018 10:14 AM
We're launching our first service portal this fall. One thing we'd like to do is offer those people who have fulfiller roles in the system a way to link from the portal to the native UI to complete their work.
- Our first idea was to add a menu item to the default SP Header Menu and restrict that items visibility to only those with fulfiller roles.
- Our second idea was to create a new menu and restrict its visibility to those with the appropriate role.
- Our third idea was to add a widget to the page and restrict its access as above.
From what I can tell, there's no OOB way to apply user criteria to a menu or a menu item (bummer). So short of adding a single purpose widget, how are you solving for this use case?
Thanks in advance for your thoughts!
John
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-29-2018 10:23 AM
Hello John,
A menu item is a great idea! I would create a new menu item in the SP Header Menu with a condition that the user has an ITIL role. I tested this in my dev instance with success. Here are some screenshots to help:
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2019 08:31 AM
Hi Dave,
We didn't actually, we ended up using roles to restrict the header menu.
We did create some advanced User Criteria for each country which has helped restricting widgets. (If this any use to you)
countryIsUK();
function countryIsUK(){
var flag = false;
var gr = new GlideRecord('sys_user');
gr.addQuery("sys_id", gs.getUserID());
gr.query();
if (gr.next()) {
if(gr.building.u_country == "ed966f2ff067c0007c1b7af45b498057"){// UK
flag = true;
} else {
}
}
return flag;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2019 10:49 AM
Best way for this would be to call the user criteria from within a script include, then simply pass that user record to the script include to do the check to see if they meet the user criteria. Unfortunate part about the condition builder in portal is that it's not intuitive. It's just a string field :).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2019 10:46 AM
FWIW, you could also check if user has any roles by doing the following: gs.getUser().hasRoles();
Nother suggestion - might want to check that HREF / URL so that it's not aimed at your DEV instance, as this won't follow you when moving to UAT/PROD. Best practice would be doing a forward slash (/) with the rest of the URL.