<<

# Bugzilla::Group

- NAME
- SYNOPSIS
- DESCRIPTION
- SUBROUTINES
- METHODS

# NAME

Bugzilla::Group - Bugzilla group class.

# SYNOPSIS

        use Bugzilla::Group;

        my $group = new Bugzilla::Group(1);
        my $group = new Bugzilla::Group({name => 'AcmeGroup'});

        my $id           = $group->id;
        my $name         = $group->name;
        my $description  = $group->description;
        my $user_reg_exp = $group->user_reg_exp;
        my $is_active    = $group->is_active;
        my $icon_url     = $group->icon_url;
        my $is_active_bug_group = $group->is_active_bug_group;

        my $group_id = Bugzilla::Group::ValidateGroupName('admin', @users);
        my @groups   = Bugzilla::Group->get_all;

# DESCRIPTION

Group.pm represents a Bugzilla Group object. It is an implementation of Bugzilla::Object, and thus has all the methods that Bugzilla::Object provides, in addition to any methods documented below.

# SUBROUTINES

`create`

  Note that in addition to what "create($params)" in Bugzilla::Object normally does, this function also makes the new group be inherited by the `admin` group. That is, the `admin` group will automatically be a member of this group.

`ValidateGroupName($name, @users)`

       Description: ValidateGroupName checks to see if ANY of the users
                    in the provided list of user objects can see the
                    named group.

       Params:      $name - String with the group name.
                    @users - An array with Bugzilla::User objects.

       Returns:     It returns the group id if successful
                    and undef otherwise.

# METHODS

`members_non_inherited`

  Returns an arrayref of Bugzilla::User objects representing people who are "directly" in this group, meaning that they're in it because they match the group regular expression, or they have been actually added to the group manually.

`flatten_group_membership`

  Accepts a list of groups and returns a list of all the groups whose members inherit membership in any group on the list. So, we can determine if a user is in any of the groups input to flatten_group_membership by querying the user_group_map for any user with DIRECT or REGEXP membership IN() the list of groups returned.

<<