summaryrefslogtreecommitdiffstats
path: root/Bugzilla/User.pm
diff options
context:
space:
mode:
authorDylan Hardison <dylan@mozilla.com>2014-04-11 22:02:08 +0200
committerDylan William Hardison <dylan@hardison.net>2014-04-14 20:20:45 +0200
commit4769d007bce5a1ebb449b53d5a5fe8b552bc74e7 (patch)
tree9c094ee6405452b09d9ffd8e487e322bd62dff74 /Bugzilla/User.pm
parent9882a6c72341d35bb70044d1cd07ec5b88336d01 (diff)
downloadbugzilla-4769d007bce5a1ebb449b53d5a5fe8b552bc74e7.tar.gz
bugzilla-4769d007bce5a1ebb449b53d5a5fe8b552bc74e7.tar.xz
Bug 993940 - backport 428490 to bmo (Group icons should be displayed for indirect memberships, too)
r=dkl
Diffstat (limited to 'Bugzilla/User.pm')
-rw-r--r--Bugzilla/User.pm26
1 files changed, 2 insertions, 24 deletions
diff --git a/Bugzilla/User.pm b/Bugzilla/User.pm
index 0429a25e3..b097ffaad 100644
--- a/Bugzilla/User.pm
+++ b/Bugzilla/User.pm
@@ -832,7 +832,8 @@ sub in_group_id {
# besides the name of the commenter.
sub groups_with_icon {
my $self = shift;
- return $self->{groups_with_icon} //= [grep { $_->icon_url } @{ $self->direct_group_membership }];
+
+ return $self->{groups_with_icon} //= [grep { $_->icon_url } @{ $self->groups }];
}
sub get_products_by_permission {
@@ -1209,24 +1210,6 @@ sub can_set_flag {
|| $self->in_group_id($flag_type->grant_group_id)) ? 1 : 0;
}
-sub direct_group_membership {
- my $self = shift;
- my $dbh = Bugzilla->dbh;
-
- if (!$self->{'direct_group_membership'}) {
- my $gid = $dbh->selectcol_arrayref('SELECT id
- FROM groups
- INNER JOIN user_group_map
- ON groups.id = user_group_map.group_id
- WHERE user_id = ?
- AND isbless = 0',
- undef, $self->id);
- $self->{'direct_group_membership'} = Bugzilla::Group->new_from_list($gid);
- }
- return $self->{'direct_group_membership'};
-}
-
-
# visible_groups_inherited returns a reference to a list of all the groups
# whose members are visible to this user.
sub visible_groups_inherited {
@@ -2624,11 +2607,6 @@ Returns a reference to an array of users. The array is populated with hashrefs
containing the login, identity and visibility. Users that are not visible to this
user will have 'visible' set to zero.
-=item C<direct_group_membership>
-
-Returns a reference to an array of group objects. Groups the user belong to
-by group inheritance are excluded from the list.
-
=item C<visible_groups_inherited>
Returns a list of all groups whose members should be visible to this user.