ACL script works on the task, but isn't working on requested item table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2024 08:04 AM - edited ‎03-11-2024 08:06 AM
We have yet to implement to the HR tool but our HR department is starting to use the catalog requests. As a workaround until we do, I've created a role to restrict access to the HR requests they're receiving. They have asked that we restrict access to RITMs and Tasks to the HR groups and the requestor of the individual requests. I've been able to restrict the tasks correctly, but for some reason the requestor still can't see the RITMs. This script works for the task ACL but for some reason it's not on the requested item table, any suggestions why this isn't working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2024 08:09 AM
@phaug , Your script is telling to hide the RITM’s to the ones created
Make this changes in the script and try -use return true in IF condition and use return false in else condition
Regards,
Shyamkumar
Regards,
Shyamkumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2024 08:17 AM - edited ‎03-11-2024 08:33 AM
I tried swapping the true and false and it's still not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2024 02:06 PM
I believe your Requester doesn't have role hr_access, which you are requiring on this access control. You should create a second access control with same script but wider role access. Some role that includes all the people that need to see their own requests, or even no role.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2024 08:17 AM
Hi @phaug ,
In script you are writing return false and return true in wrong loops. Please change the return true.
Write script like below:
var answer=false;
if(gs.hasRole('admin'))//update your condition
{
answer = true;
}
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda