wcasas1
Tera Contributor

I use the condition as: gs.getSession().isInteractive() && !gs.hasRole('admin') to make sure admins have all visibility in case of issues. Then as the rule for your second scenario you can use an if statement and query like this:

if(gs.getUser().isMemberOf('GROUP1','GROUP1')){
var qc = current.addQuery('assignment_group', 'IN', 'GROUP1,GROUP2') ;}