ACL script works on the task, but isn't working on requested item table.

phaug
Tera Contributor

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?

 

 

phaug_1-1710169324340.png

7 REPLIES 7

shyamkumar VK
Kilo Patron

@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

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

I tried swapping the true and false and it's still not working.

 

phaug_0-1710171171887.png

 

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.

Sumanth16
Kilo Patron

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