Limit Case view based on assignment group in the case

Elena19
Tera Expert

Hi there,

we are trying to limit the case view based on assignment group in the cases. 

for example, if customer1 user is in the group of "a", customer1 user is only able to see cases that are assigned group is set to "a". 

I am guessing I can do this in  ACL, but kinda lost here what I should do.

Please share any ideas.

 

thanks!

Elena

 

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

Hi Elena,

Yes, you can use ACL of type: Read operation on required table with script as below.

anwer=false;
if(gs.getUser().isMemberOf(current.assignment_group))
{
answer=true;
}

OR simply add condition as below instead of above script

Assignment Group | is dynamic | one of my groups

 

Suggestion however, will be to use Query BR on reqiured table with script as below.

if(gs.getUser().isMemberOf(current.assignment_group))
{
current.addQuery('assignment_group',current.assignment_group);
}

Benefit of BR will be it will not show 'Security constraint error....' message as it will be for ACL.

View solution in original post

2 REPLIES 2

Jaspal Singh
Mega Patron
Mega Patron

Hi Elena,

Yes, you can use ACL of type: Read operation on required table with script as below.

anwer=false;
if(gs.getUser().isMemberOf(current.assignment_group))
{
answer=true;
}

OR simply add condition as below instead of above script

Assignment Group | is dynamic | one of my groups

 

Suggestion however, will be to use Query BR on reqiured table with script as below.

if(gs.getUser().isMemberOf(current.assignment_group))
{
current.addQuery('assignment_group',current.assignment_group);
}

Benefit of BR will be it will not show 'Security constraint error....' message as it will be for ACL.

Thank you so much Jaspal!

I decided to use Query BR and it limited access from customer to view the cases.

thanks a lot!

Elena