summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2005-08-19 05:09:36 +0200
committerbugreport%peshkin.net <>2005-08-19 05:09:36 +0200
commit9d4872bef3b679b020b6678445ec84504e1f8a1e (patch)
treeba83ecbc319e12000d9ee00d2da2f04facded3d6 /Bugzilla/Bug.pm
parentd11ebe02d5e293f88992090878db4c95523f1809 (diff)
downloadbugzilla-9d4872bef3b679b020b6678445ec84504e1f8a1e.tar.gz
bugzilla-9d4872bef3b679b020b6678445ec84504e1f8a1e.tar.xz
Bug 304583: Remove all remaining need to rederive inherited groups
Patch by Joel Peshkin <bugreport@peshkin.net> r=mkanat, a=justdave
Diffstat (limited to 'Bugzilla/Bug.pm')
-rwxr-xr-xBugzilla/Bug.pm9
1 files changed, 3 insertions, 6 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index f281dbda8..ec1927355 100755
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -541,25 +541,22 @@ sub groups {
# user_group_map record putting the user in that group.
# The LEFT JOINs are checking for record existence.
#
+ my $grouplist = Bugzilla->user->groups_as_string;
my $sth = $dbh->prepare(
"SELECT DISTINCT groups.id, name, description," .
" bug_group_map.group_id IS NOT NULL," .
- " user_group_map.group_id IS NOT NULL," .
+ " CASE WHEN groups.id IN($grouplist) THEN 1 ELSE 0 END," .
" isactive, membercontrol, othercontrol" .
" FROM groups" .
" LEFT JOIN bug_group_map" .
" ON bug_group_map.group_id = groups.id" .
" AND bug_id = ?" .
- " LEFT JOIN user_group_map" .
- " ON user_group_map.group_id = groups.id" .
- " AND user_id = ?" .
- " AND isbless = 0" .
" LEFT JOIN group_control_map" .
" ON group_control_map.group_id = groups.id" .
" AND group_control_map.product_id = ? " .
" WHERE isbuggroup = 1" .
" ORDER BY description");
- $sth->execute($self->{'bug_id'}, Bugzilla->user->id,
+ $sth->execute($self->{'bug_id'},
$self->{'product_id'});
while (my ($groupid, $name, $description, $ison, $ingroup, $isactive,