ACL is not working as expected for user with a specific role
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 06:35 AM
Hello,
I am having an issue with a create ACL. It is partially working, it works on the work order task table but not the SM_part_requirement table from the Work Order. I click on part requirements>New from the work order and it allows the user with the custom role "director" to create Part Requirements. I want to restrict this role from creating part requirements. How can I accomplish this. It does not seem to be working with the script below. The restriction does work for the work order task but not the work order.
Any assistance would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 07:08 AM
Can you please help me understand under which module these tables are part of?
Also have you created this ACL from scratch or it was existing ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 07:24 AM
Hello,
These tables are part of Field Service Management . The Parts Requirement is a related list on the work order and work order task form. This is a modification to an existing ACL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 07:31 AM
Assuming you have not modified the SCRIPT part of the acl as well, I would suggest to check if there is any other CREATE acl as well on 'Parts Requirement' table as if that ACL is allowing that particular role to create record, this ACL won't be overriding that behaviour.
Also within this ACL script, you can write down a gs.log(answer) in each if/else statement & see what values you are getting when you try to create a record in Parts Requirement under Work Order & under Work Order Task both separately, it will give you some idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 08:31 AM
I did check to see if there was another Create ACL allowing this but there is not another for the parts requirements table. I also tried removing the else statement and it seemed to work but it restricts for all, including myself as an admin. Scripting is a challenge for me.