Restrict Access to Group member using ACL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2025 09:35 AM
I have requirement to restrict access to user if user is member of particular group.
When user is member of particular group, user should see case which is assigned to two groups. For that I wrote below script, but it is not working as expected.
I am using Deny Unless Read ACL for "sn_hr_core_case" table.
if (gs.getUser().isMemberOf('Talent Acquisition Coordination Representative India') && !gs.getUser().isMemberOf('Talent Acquisition Coordination Representative Manila')) {
if (current.assignment_group == talentAcqspecialistIndia || current.assignment_group == talentAcqIndia) {
answer = true;
} else {
answer = false;
}
}else
{
answer = true;
}
The issue here, logged in user is able to see case assigned to the first group in if loop (
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2025 10:21 AM - edited ‎07-06-2025 10:21 AM
Hi @MelwinA ,
Can you try this
if (current.assignment_group.toString() == talentAcqspecialistIndia || current.assignment_group.toString() == talentAcqIndia )
in second if condition
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Chandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2025 10:36 AM
Hi @SD_Chandan
I have tried this already. Still the same. It is not working.