Bugzilla::Group - Bugzilla group class.


    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;


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.



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.



Determines whether it's OK to remove this group from the database, and throws an error if it's not OK.


boolean If you want to only check if the group can be deleted at all, under any circumstances, specify test_only to just do the most basic tests (the other parameters will be ignored in this situation, as those tests won't be run).


boolean True if it would be OK to remove all users who are in this group from this group.


boolean True if it would be OK to remove all bugs that are in this group from this group.


boolean True if it would be OK to stop all flagtypes that reference this group from referencing this group (e.g., as their grantgroup or requestgroup).


boolean True if it would be OK to remove this group from all group controls on products.

Returns (nothing)

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.


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.