Groups operations
The groups operations can be used with any Object Type for the script. This allows you to determine if a user is a member of a group. The object contains a Principal object with attributes (id, name, display_name, type (user, group, or system)).
Type groups.findByName(name) in the script line, along with the user or group
name. The following is an example of using
groups:
group = groups.findByName('Some Group')
if group is not None:
# perform some action
pass