ACL script is not working properly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 02:54 AM
Hi All,
I am having an existing ACLs on the table - asmt_assessment_instance_question.
In read and write acl: existing script is like below with the role - u_ticket_admin:
I modified the script in both read and write acls as below but still even with the logged in users who are having these retail roles are still viewing the records, which should not happen. Please guide here what I am missing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 04:16 AM
I presume you have answer=false at the start of your ACL script so it is deny by default?
Without that it won't work the way you want.
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2024 04:21 AM
Hi @Renu9
Try this,
if (
(current.instance.user == gs.getUserID()) ||
(
((new AssessmentUtils()).hasAssessmentRoles(current.instance.metric_type.roles)) &&
(current.instance.trigger_id.assigned_to.title != 'Retail Specialist') &&
(current.instance.trigger_id.assigned_to.title != 'Retail Specialist II')
)
) {
gs.log("access is provided " + gs.getUserID());
answer = true;
}
If this work accept it as solution for other user help and mark as helpfuls
Regards,
Suyash