Issue with work_notes visibility.

vidhya_mouli
Giga Sage

Current Scenario: I have an ACL for Work notes read to check if the caller is same as logged in user. Then work notes should not be visible. Now this prevents the work notes to be visible in the Employee Center.

 
Issue: When the caller and the assigned_to person are the same person, this ACL prevents work notes visibility even in SOW.
 
Any suggestion on how to resolve this?
7 REPLIES 7

Anurag Tripathi
Mega Patron
Mega Patron

In the ACL script you should check for second condition first and use if else if

Like below:

if(<caller and the assigned_to person are the same >)

answer= true;

else if(<caller is same as logged in user> )

answer = false;

-Anurag

Did you try this?

-Anurag

Yes, but it did not work. I am checking if my script is correct.

udaysingh16
Tera Contributor

Hi,

 

 

 

if (!gs.hasRole("admin") && gs.hasRole("employee_center_role")) {

  answer = true;

}

else {

  answer = false;

}

 

Also you can use, 
if(gs.getUser().isMemberOf("your group NAME")){
	answer = true;
	gs.log(gs.getUser().isMemberOf("your group NAME"),"acl working now");
}else
	{
		answer = false;
	}

 

Mark this helpful if this works.