Can you restrict showing a module link by group instead of role?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2014 12:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2014 04:09 AM
Is it a business requirement or you are just doing it for testing purpose? If business requirement then I believe you need to raise a question back to business for this requirement. When roles itself are tagged to group then it should automatically work for group as well.
However, in other way around it can be achieved using scripting, but as Service-Now suggests use scripting only where it is required.
Brgds, AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2014 08:28 AM
Add a new glide_list field to the application and/or module table(s) (ex: u_group_access).
Create before query Business rule(s) against the table(s):
Conditions (this is assuming you only want this to apply to users who have no roles and are only members of groups:
!gs.getUser().hasRoles() && !gs.hasRole('admin')
Script:
qry = 'u_group_accessISEMPTY^ORu_group_accessLIKEjavascript:getMyGroups()';
current.addEncodedQuery(qry);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 04:02 AM
I have only been able to do this by role, in the Visibility section of the Module (via System Definition>Modules), so although this doesn't really answer the question you have, the only way to limit access to a module is by Role.
If you can add a role to the group, as previously suggested by Jesus Villanueva, and then add that role to the group in question, only the users in that group (who are therefore the only people with that particular role) will be able to see the module in the menu.
Additional thought on the chargeable situation with customised roles:
If these users are already in a group, then they will already have some roles, and be consuming a licence, so there should not be any additional charge for adding a new role to the group. - Although it would be best to check this with your Account Manager in order to be certain.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2016 04:09 AM
Just read back my own advice - not very good. I meant to say, create and add the role to the group, then set the visibility filter on the Module to that role. - Only the users with that role can then see the module.