summaryrefslogtreecommitdiffstats
path: root/bug_form.pl
diff options
context:
space:
mode:
authorterry%mozilla.org <>2000-02-18 00:53:40 +0100
committerterry%mozilla.org <>2000-02-18 00:53:40 +0100
commit4410f69187675685ff241885622643652d72920e (patch)
treeca20a4733365afba480c35e06d8a910fa579a6d1 /bug_form.pl
parentc11194d54e2db8681b84c385dccf5398c548d156 (diff)
downloadbugzilla-4410f69187675685ff241885622643652d72920e.tar.gz
bugzilla-4410f69187675685ff241885622643652d72920e.tar.xz
Display all possible state transitions in a bug if the user is not
logged in. Since they haven't logged in, we don't know what they will be allowed to do. And users who disable cookies tend to pretty often not be logged in.
Diffstat (limited to 'bug_form.pl')
-rw-r--r--bug_form.pl15
1 files changed, 11 insertions, 4 deletions
diff --git a/bug_form.pl b/bug_form.pl
index 520949a36..a556867f2 100644
--- a/bug_form.pl
+++ b/bug_form.pl
@@ -460,11 +460,18 @@ my $knum = 1;
my $status = $bug{'bug_status'};
-my $canedit = UserInGroup("editbugs");
+# In the below, if the person hasn't logged in ($::userid == 0), then
+# we treat them as if they can do anything. That's because we don't
+# know why they haven't logged in; it may just be because they don't
+# use cookies. Display everything as if they have all the permissions
+# in the world; their permissions will get checked when they log in
+# and actually try to make the change.
+
+my $canedit = UserInGroup("editbugs") || ($::userid == 0);
my $canconfirm;
if ($status eq $::unconfirmedstate) {
- $canconfirm = UserInGroup("canconfirm");
+ $canconfirm = UserInGroup("canconfirm") || ($::userid == 0);
if ($canedit || $canconfirm) {
print "<INPUT TYPE=radio NAME=knob VALUE=confirm>";
print "Confirm bug (change status to <b>NEW</b>)<br>";
@@ -473,8 +480,8 @@ if ($status eq $::unconfirmedstate) {
}
-if ($::userid && ($canedit || $::userid == $assignedtoid ||
- $::userid == $reporterid || $::userid == $qacontactid)) {
+if ($canedit || $::userid == $assignedtoid ||
+ $::userid == $reporterid || $::userid == $qacontactid) {
if (IsOpenedState($status)) {
if ($status ne "ASSIGNED") {
print "<INPUT TYPE=radio NAME=knob VALUE=accept>";