summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2014-09-26 00:08:34 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2014-09-26 00:08:34 +0200
commit135afc0a669578ca4ca8188c580acb2faadf5472 (patch)
tree36376900e1324ef510c3778ba1f48bb997ba7d54
parent03c85287139860563b219ea85eb0583e7d40158b (diff)
downloadbugzilla-135afc0a669578ca4ca8188c580acb2faadf5472.tar.gz
bugzilla-135afc0a669578ca4ca8188c580acb2faadf5472.tar.xz
Bug 1071033: Variable "$user" will not stay shared at buglist.cgi
r=dkl a=sgreen
-rwxr-xr-xbuglist.cgi9
1 files changed, 4 insertions, 5 deletions
diff --git a/buglist.cgi b/buglist.cgi
index c04c7853f..5e84b340b 100755
--- a/buglist.cgi
+++ b/buglist.cgi
@@ -283,6 +283,7 @@ sub GetGroups {
sub _get_common_flag_types {
my $component_ids = shift;
+ my $user = Bugzilla->user;
# Get all the different components in the bug list
my $components = Bugzilla::Component->new_from_list($component_ids);
@@ -303,12 +304,10 @@ sub _get_common_flag_types {
if $flag_type_count == scalar @$components;
}
- # We only show flags that a user has request or set rights on
+ # We only show flags that a user can request.
my @show_flag_types
- = grep { $user->can_request_flag($_) || $user->can_set_flag($_) }
- values %common_flag_types;
- my $any_flags_requesteeble =
- grep($_->is_requesteeble, @show_flag_types);
+ = grep { $user->can_request_flag($_) } values %common_flag_types;
+ my $any_flags_requesteeble = grep { $_->is_requesteeble } @show_flag_types;
return(\@show_flag_types, $any_flags_requesteeble);
}