aboutsummaryrefslogtreecommitdiffstats
path: root/relogin.cgi
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-05-12 09:40:56 +0000
committermkanat%bugzilla.org <>2006-05-12 09:40:56 +0000
commitd9cbb0f0a62bba345ed26ac68364bb441f41d35d (patch)
tree415d30523fb728a3192970a6d2b168b095f260dc /relogin.cgi
parentd7447bf95827d7e9da681d496a192fffbc2810a4 (diff)
downloadbugs-d9cbb0f0a62bba345ed26ac68364bb441f41d35d.tar
bugs-d9cbb0f0a62bba345ed26ac68364bb441f41d35d.tar.gz
bugs-d9cbb0f0a62bba345ed26ac68364bb441f41d35d.tar.bz2
bugs-d9cbb0f0a62bba345ed26ac68364bb441f41d35d.tar.xz
bugs-d9cbb0f0a62bba345ed26ac68364bb441f41d35d.zip
Bug 300410: Bugzilla::Auth needs to be restructured to not require a BEGIN block
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'relogin.cgi')
-rwxr-xr-xrelogin.cgi5
1 files changed, 2 insertions, 3 deletions
diff --git a/relogin.cgi b/relogin.cgi
index 0d772f9eb..0385b8e2f 100755
--- a/relogin.cgi
+++ b/relogin.cgi
@@ -75,8 +75,7 @@ elsif ($action eq 'begin-sudo') {
# and password.
# We only need to do this for authentication methods that involve Bugzilla
# directly obtaining a login (i.e. normal CGI login), as opposed to other
- # methods (like Environment vars login). We assume that if a user can log
- # out, they can also log in:
+ # methods (like Environment vars login).
# First, record if Bugzilla_login and Bugzilla_password were provided
my $credentials_provided;
@@ -92,7 +91,7 @@ elsif ($action eq 'begin-sudo') {
# At this point, the user is logged in. However, if they used a method
# where they could have provided a username/password (i.e. CGI), but they
# did not provide a username/password, then throw an error.
- if ($user->get_flag('can_logout') && !$credentials_provided) {
+ if ($user->authorizer->can_login && !$credentials_provided) {
ThrowUserError('sudo_password_required',
{ target_login => $cgi->param('target_login'),
reason => $cgi->param('reason')});