Restricting view of Incidents (ACL)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 08:12 AM
Hello Community,
The Incident form has a lot of ACLs, However I need to lock down All HR Incidents to users with an HR Role...I've put the following in for a Read ACL, however it locks everyone out of the Incidents
if the "Functional Area" = Human Resources I want to restrict those Incidents to only users with that role
ACL Script:
current.u_functional_area = 'HUMAN RESOURCES';
Requires Role:
HR
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 10:13 AM
What if I want to lock down all the fields on incident for HR?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 10:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 10:56 AM
Thanks! What does the top of your ACL in that screen shot look like?
Thank you!
Jason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 11:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 11:19 AM
Hi Jason,
If you have multiple ACLs of same type, then even a single ACL which returns true is sufficient enough to grant user an access to record.
Keeping this fact in mind, you will have to either modify all ACLs accordingly to block the access
OR
You can have the Before Query business rule which will grant an access to HR Related incidents to HR people only and block an Access for others
Query Business rule should be like
if(!gs.hasRole('hrRelatedRole')){
current.addQuery('u_functional_area ','!=','HUMAN RESOURCES');
}