ACL Condition to see groups where logged in user is a member

Shilpa Mannoni1
Tera Contributor

I have a table X that stores document types which has group table as one of the reference.

I want to define an ACL stating, user can only read records from table X if he is a member of the group.

Ex: If there are 10 groups, and logged in user is a member of 4 groups, then he should only see document types belonging to 4 groups.

Can someone help me guide how to achieve this?

1 ACCEPTED SOLUTION

Abhay Kumar1
Giga Sage

@Shilpa Mannoni1 you can try below script with selecting just table name and keep field as none  while creating acl on x table,

answer=gs.getUser().isMemberOf(current.group_field_name.getDisplayValue());

Hope this will help you.

View solution in original post

2 REPLIES 2

Abhay Kumar1
Giga Sage

@Shilpa Mannoni1 you can try below script with selecting just table name and keep field as none  while creating acl on x table,

answer=gs.getUser().isMemberOf(current.group_field_name.getDisplayValue());

Hope this will help you.

Shilpa Mannoni1
Tera Contributor

Thanks for your help Abhay.