Restrict @mention to users with read access to record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-03-2023 11:16 AM - edited ā11-03-2023 11:44 AM
My client would like to limit who can be @mentioned on a ticket platform wide to only people with read access to the ticket. I created a Before Query business rule on the User table based on another community post - this business rule does work to limit @mention to users with the hr admin role, however I want to see if we can limit to users with read access to the record instead. Advice on how to modify business rule or a different approach would be appreciated! Thanks
(function executeRule(current, previous /*null when async*/ ) {
try {
if (gs.action.getGlideURI() != '') {
if (gs.action.getGlideURI().getMap() != '') {
if (gs.action.getGlideURI().toString().startsWith('api/now/form/mention/record/')) {
current.addEncodedQuery('roles=sn_hr_core.admin');
current.addActiveQuery();
gs.addInfoMessage(current); // Returns "sys_user"
}
}
}
} catch (errObj) {
gs.error('Global_Set_Filter_Mention-' + errObj);
}
})(current, previous);
If we have a method to prevent any @mention from additional comments that would be +1 as the client is wondering this as well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-23-2024 01:39 AM
Hi
Is this working in Service Operations Workspace?
I can see that it works /restricts users only in UI16