How to hide/Show service Portal menus based on custom Roles (Created in a scoped table)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2018 04:17 AM
Hi All,
i have following tables created to replicate OOTB user access tables:
- AS Users (refer to the user table)
- AS Roles
- AS Groups
I have a table 'Role' created in scoped table and I am using script to map this role to the users table.
How can I restrict Service Portal menu visibility based on custom roles?
Is it possible?
Thanks.
KUMAR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2018 04:31 AM
Create a script include to return true/false if user is having custom role and then call the same in condition field of menu item.
condition: new SIName().functionName()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2018 04:45 AM
If it's the Header Menu you're wanting to edit, it is possible to show/hide the entries by adding to the Conditions field.
On our service portal there are two menu items that only show if the logged in user meets the conditions set on the menu item. One is based on their department:
gs.getUser().getDepartmentID() == '6403816bdbc40748c0bc3220ad961921';
While the other is based on if they are a manager:
conds.addEncodedQuery('managerDYNAMIC90d1921e5f510100a9ad2572f2b477fe');