RT 5.0.1 Documentation

RT::Groups

Go to latest version →

NAME

  RT::Groups - a collection of RT::Group objects

SYNOPSIS

  use RT::Groups;
  my $groups = RT::Groups->new($CurrentUser);
  $groups->UnLimit();
  while (my $group = $groups->Next()) {
     print $group->Id ." is a group id\n";
  }

DESCRIPTION

METHODS

PrincipalsAlias

Returns the string that represents this Users object's primary "Principals" alias.

LimitToSystemInternalGroups

Return only SystemInternal Groups, such as "privileged" "unprivileged" and "everyone"

LimitToUserDefinedGroups

Return only UserDefined Groups

LimitToRolesForObject OBJECT

Limits the set of groups to role groups specifically for the object in question based on the object's class and ID. If the object has no ID, the roles are not limited by group Instance. That is, calling this method on an unloaded object will find all role groups for that class of object.

Replaces "LimitToRolesForQueue", "LimitToRolesForTicket", and "LimitToRolesForSystem".

WithMember {PrincipalId => PRINCIPAL_ID, Recursively => undef}

Limits the set of groups returned to groups which have Principal PRINCIPAL_ID as a member. Returns the alias used for the join.

WithRight { Right => RIGHTNAME, Object => RT::Record, IncludeSystemRights => 1, IncludeSuperusers => 0, EquivObjects => [ ] }

Find all groups which have RIGHTNAME for RT::Record. Optionally include global rights and superusers. By default, include the global rights, but not the superusers.

LimitToEnabled

Only find items that haven't been disabled

LimitToDeleted

Only find items that have been deleted.

SimpleSearch

Does a 'simple' search of Groups against a specified Term.

This Term is compared to a number of fields using various types of SQL comparison operators.

Ensures that the returned collection of Groups will have a value for Return.

This method is passed the following. You must specify a Term and a Return.

    Fields     - Hashref of data - defaults to C<$GroupSearchFields> emulate that if you want to override
    Term       - String that is in the fields specified by Fields
    Return     - What field on the User you want to be sure isn't empty
    Exclude    - Array reference of ids to exclude
    Max        - Size to limit this collection to
← Back to index