Hide Visibility of RITM and SCTASK of 1 catalog item from ITIL users in the console
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2024 07:12 AM - edited 09-08-2024 07:36 AM
Hello Experts,
We have created a ACL on a sc_req_item table for a service request record to be visible only to a specific group for which we created a custom role. But still users who aren't part of this specific group are able to view service request record in the console.
We have ask to hide service catalog and category in service portal for users who aren't part of specific group with custom role which we have fulfilled but the other ask is to hide RITM and SCTASK also from users who aren't part of the specific group with custom role which we created. We created acl on requested item table first but it is not working
We have tried out script as well in the ACL of sc_req_item table.
1) answer = gs.hasRole('specific_role_name');
2) var userGroup = gs.getUser().getMyGroups();
var allowedGroup = 'your_specific_group_sys_id';
answer = userGroup.indexOf(allowedGroup) != -1;
3 We have tried a script to block visibility of this 1 catalog item record in console to itil and approver users as well but it didn't workout too.
Kindly provide your suggestions if anyone has achieved working on this type of ask.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2024 07:38 AM
Hello @Community Alums ,
Why don't you try the below script.
1) answer = gs.hasRoleExactly('specific_role_name');
2) var userGroup = gs.getUser().getMyGroups();
var allowedGroup = 'your_specific_group_sys_id';
if(userGroup.indexOf(allowedGroup) != -1){
answer=true;
}else{
answer=false;
}
Please mark my answer as accepted solution and give thumbs up, if it helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2024 07:52 AM
Hi Abhishek,
Thanks for quick reply, unfortunately the above didn't work.
BR,
Raj