I wish to filter records in a table based on whether the current user is part of a security group.
A single user test for user 'fred' (see below) worked correctly such that user fred would see all records, but all others users would only see 'Y' records.
!_user:fred AND shareok:Y OR _user:fred AND shareok:*
However, I now want to validate if users belong to a security group:
- If user not defined in security group, restrict the records to only those where a field called shareok has a value of 'Y'.
- If user defined in the security group, then effectively no filter required (hence see all records regardless of the shareok field value)
- My security group is 'qld covid vaccine record administrators'
I've tried both of the following filters, but a user defined in that security group is failing the test.
- !_user.userInSecurityGroup(qld covid vaccine record administrators) AND shareok:Y OR _user.userInSecurityGroup(qld covid vaccine record administrators) AND shareok:*
- _user.userInSecurityGroup(qld covid vaccine record administrators):false AND shareok:Y OR _user.userInSecurityGroup(qld covid vaccine record administrators):true AND shareok:*
Any ideas?
Example of second test (false/true)
