diff options
author | mkanat%bugzilla.org <> | 2006-11-04 08:16:46 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-11-04 08:16:46 +0100 |
commit | 7f94705675428a544f82d485f79f60f052e67fdf (patch) | |
tree | fce95d9d62f4db3d7a267b4c0d6c0d5ab43b3567 /Bugzilla/Group.pm | |
parent | 9162305edb319289526f4503f5839bb21ea82724 (diff) | |
download | bugzilla-7f94705675428a544f82d485f79f60f052e67fdf.tar.gz bugzilla-7f94705675428a544f82d485f79f60f052e67fdf.tar.xz |
Bug 352403: Create an object for saved searches, and have Bugzilla::User use it
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'Bugzilla/Group.pm')
-rw-r--r-- | Bugzilla/Group.pm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Bugzilla/Group.pm b/Bugzilla/Group.pm index 0f7771efe..c80d2333c 100644 --- a/Bugzilla/Group.pm +++ b/Bugzilla/Group.pm @@ -81,6 +81,20 @@ sub _rederive_regexp { RederiveRegexp($self->user_regexp, $self->id); } +sub members_non_inherited { + my ($self) = @_; + return $self->{members_non_inherited} + if exists $self->{members_non_inherited}; + + my $member_ids = Bugzilla->dbh->selectcol_arrayref( + 'SELECT DISTINCT user_id FROM user_group_map + WHERE isbless = 0 AND group_id = ?', + undef, $self->id) || []; + require Bugzilla::User; + $self->{members_non_inherited} = Bugzilla::User->new_from_list($member_ids); + return $self->{members_non_inherited}; +} + ################################ ##### Module Subroutines ### ################################ @@ -246,3 +260,16 @@ be a member of this group. and undef otherwise. =back + +=head1 METHODS + +=over + +=item C<members_non_inherited> + +Returns an arrayref of L<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. + +=back |