diff options
author | bbaetz%student.usyd.edu.au <> | 2002-06-17 16:38:56 +0000 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-06-17 16:38:56 +0000 |
commit | 70eb21091d161fe0325000af992f6f398683c92a (patch) | |
tree | f76e853435c05bbb3d88b56c174faa54ae7828f6 /buglist.cgi | |
parent | 89aebbf6bf7cf73f9ae51d295aee68205c68e731 (diff) | |
download | bugs-70eb21091d161fe0325000af992f6f398683c92a.tar bugs-70eb21091d161fe0325000af992f6f398683c92a.tar.gz bugs-70eb21091d161fe0325000af992f6f398683c92a.tar.bz2 bugs-70eb21091d161fe0325000af992f6f398683c92a.tar.xz bugs-70eb21091d161fe0325000af992f6f398683c92a.zip |
Bug 151053, ConnectToDatabase/quietly_check_login sometimes not called
early enough
r=mattyt, jouni
Diffstat (limited to 'buglist.cgi')
-rwxr-xr-x | buglist.cgi | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/buglist.cgi b/buglist.cgi index b649b8f1e..06eff5605 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -66,14 +66,28 @@ ConnectToDatabase(); # Data and Security Validation ################################################################################ +# Whether or not the user wants to change multiple bugs. +my $dotweak = $::FORM{'tweak'} ? 1 : 0; + +# Log the user in +if ($dotweak) { + confirm_login(); + if (!UserInGroup("editbugs")) { + DisplayError("Sorry, you do not have sufficient privileges to edit + multiple bugs."); + exit; + } + GetVersionTable(); +} +else { + quietly_check_login(); +} + # Determine the format in which the user would like to receive the output. # Uses the default format if the user did not specify an output format; # otherwise validates the user's choice against the list of available formats. my $format = ValidateOutputFormat($::FORM{'format'}, "list"); -# Whether or not the user wants to change multiple bugs. -my $dotweak = $::FORM{'tweak'} ? 1 : 0; - # Use server push to display a "Please wait..." message for the user while # executing their query if their browser supports it and they are viewing # the bug list as HTML and they have not disabled it by adding &serverpush=0 @@ -137,20 +151,6 @@ if ($::FORM{'cmdtype'} eq 'runnamed') { $filename =~ s/\s//; } -if ($dotweak) { - confirm_login(); - if (!UserInGroup("editbugs")) { - DisplayError("Sorry, you do not have sufficient privileges to edit - multiple bugs."); - exit; - } - GetVersionTable(); -} -else { - quietly_check_login(); -} - - ################################################################################ # Utilities ################################################################################ |