Groups operations in scripts

The groups operations can be used with any Object Type for the script. You can use it to determine whether 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 example shows how to use groups.
group = groups.findByName('Some Group')
    if group is not None:
      # perform some action
      pass