diff options
author | bugreport%peshkin.net <> | 2004-07-12 10:48:45 +0000 |
---|---|---|
committer | bugreport%peshkin.net <> | 2004-07-12 10:48:45 +0000 |
commit | abdd4eba8b321e66d9a86d2d3592893f69632618 (patch) | |
tree | 305a5c0f7857f37f576b0969dc46f9ff2950b14a /Bugzilla/Auth | |
parent | ce983f5d751e61c5500eac45e5db29eee7309520 (diff) | |
download | bugs-abdd4eba8b321e66d9a86d2d3592893f69632618.tar bugs-abdd4eba8b321e66d9a86d2d3592893f69632618.tar.gz bugs-abdd4eba8b321e66d9a86d2d3592893f69632618.tar.bz2 bugs-abdd4eba8b321e66d9a86d2d3592893f69632618.tar.xz bugs-abdd4eba8b321e66d9a86d2d3592893f69632618.zip |
Backing out bug 241900
Diffstat (limited to 'Bugzilla/Auth')
-rw-r--r-- | Bugzilla/Auth/CGI.pm (renamed from Bugzilla/Auth/Login/CGI.pm) | 15 | ||||
-rw-r--r-- | Bugzilla/Auth/Cookie.pm (renamed from Bugzilla/Auth/Login/CGI/Cookie.pm) | 8 | ||||
-rw-r--r-- | Bugzilla/Auth/DB.pm (renamed from Bugzilla/Auth/Verify/DB.pm) | 16 | ||||
-rw-r--r-- | Bugzilla/Auth/LDAP.pm (renamed from Bugzilla/Auth/Verify/LDAP.pm) | 16 |
4 files changed, 19 insertions, 36 deletions
diff --git a/Bugzilla/Auth/Login/CGI.pm b/Bugzilla/Auth/CGI.pm index 2f8ca071d..471e538e9 100644 --- a/Bugzilla/Auth/Login/CGI.pm +++ b/Bugzilla/Auth/CGI.pm @@ -25,9 +25,8 @@ # Gervase Markham <gerv@gerv.net> # Christian Reis <kiko@async.com.br> # Bradley Baetz <bbaetz@acm.org> -# Erik Stambaugh <erik@dasbistro.com> -package Bugzilla::Auth::Login::CGI; +package Bugzilla::Auth::CGI; use strict; @@ -50,7 +49,7 @@ sub login { my $username = $cgi->param("Bugzilla_login"); my $passwd = $cgi->param("Bugzilla_password"); - my $authmethod = Param("user_verify_method"); + my $authmethod = Param("loginmethod"); my ($authres, $userid, $extra, $info) = Bugzilla::Auth->authenticate($username, $passwd); @@ -99,11 +98,11 @@ sub login { $username = $cgi->cookie("Bugzilla_login"); $passwd = $cgi->cookie("Bugzilla_logincookie"); - require Bugzilla::Auth::Login::CGI::Cookie; + require Bugzilla::Auth::Cookie; my $authmethod = "Cookie"; ($authres, $userid, $extra) = - Bugzilla::Auth::Login::CGI::Cookie->authenticate($username, $passwd); + Bugzilla::Auth::Cookie->authenticate($username, $passwd); # If the data for the cookie was incorrect, then treat that as # NODATA. This could occur if the user's IP changed, for example. @@ -144,7 +143,7 @@ sub login { { 'target' => $cgi->url(-relative=>1), 'form' => \%::FORM, 'mform' => \%::MFORM, - 'caneditaccount' => Bugzilla::Auth->can_edit->{'new'}, + 'caneditaccount' => Bugzilla::Auth->can_edit, } ) || ThrowTemplateError($template->error()); @@ -234,7 +233,7 @@ __END__ =head1 NAME -Bugzilla::Auth::Login::CGI - CGI-based logins for Bugzilla +Bugzilla::Auth::CGI - CGI-based logins for Bugzilla =head1 SUMMARY @@ -247,7 +246,7 @@ Users are first authenticated against the default authentication handler, using the CGI parameters I<Bugzilla_login> and I<Bugzilla_password>. If no data is present for that, then cookies are tried, using -L<Bugzilla::Auth::Login::CGI::Cookie>. +L<Bugzilla::Auth::Cookie>. =head1 SEE ALSO diff --git a/Bugzilla/Auth/Login/CGI/Cookie.pm b/Bugzilla/Auth/Cookie.pm index 9c0e2e566..b50acbe24 100644 --- a/Bugzilla/Auth/Login/CGI/Cookie.pm +++ b/Bugzilla/Auth/Cookie.pm @@ -26,7 +26,7 @@ # Christian Reis <kiko@async.com.br> # Bradley Baetz <bbaetz@acm.org> -package Bugzilla::Auth::Login::CGI::Cookie; +package Bugzilla::Auth::Cookie; use strict; @@ -93,7 +93,7 @@ __END__ =head1 NAME -Bugzilla::Auth::Login::CGI::Cookie - cookie authentication for Bugzilla +Bugzilla::Cookie - cookie authentication for Bugzilla =head1 SUMMARY @@ -108,8 +108,8 @@ restricted to certain IP addresses as a security meaure. The exact restriction can be specified by the admin via the C<loginnetmask> parameter. This module does not ever send a cookie (It has no way of knowing when a user -is successfully logged in). Instead L<Bugzilla::Auth::Login::CGI> handles this. +is successfully logged in). Instead L<Bugzilla::Auth::CGI> handles this. =head1 SEE ALSO -L<Bugzilla::Auth>, L<Bugzilla::Auth::Login::CGI> +L<Bugzilla::Auth>, L<Bugzilla::Auth::CGI> diff --git a/Bugzilla/Auth/Verify/DB.pm b/Bugzilla/Auth/DB.pm index 4db34b5cf..dee3b5db9 100644 --- a/Bugzilla/Auth/Verify/DB.pm +++ b/Bugzilla/Auth/DB.pm @@ -25,9 +25,8 @@ # Gervase Markham <gerv@gerv.net> # Christian Reis <kiko@async.com.br> # Bradley Baetz <bbaetz@acm.org> -# Erik Stambaugh <erik@dasbistro.com> -package Bugzilla::Auth::Verify::DB; +package Bugzilla::Auth::DB; use strict; @@ -35,15 +34,6 @@ use Bugzilla::Config; use Bugzilla::Constants; use Bugzilla::Util; -# can_edit is now a hash. - -my $can_edit = { - 'new' => 1, - 'userid' => 0, - 'login_name' => 1, - 'realname' => 1, -}; - sub authenticate { my ($class, $username, $passwd) = @_; @@ -71,6 +61,8 @@ sub authenticate { return (AUTH_OK, $userid); } +sub can_edit { return 1; } + sub get_id_from_username { my ($class, $username) = @_; my $dbh = Bugzilla->dbh; @@ -119,7 +111,7 @@ __END__ =head1 NAME -Bugzilla::Auth::Verify::DB - database authentication for Bugzilla +Bugzilla::Auth::DB - database authentication for Bugzilla =head1 SUMMARY diff --git a/Bugzilla/Auth/Verify/LDAP.pm b/Bugzilla/Auth/LDAP.pm index 737827ee0..c34c3698f 100644 --- a/Bugzilla/Auth/Verify/LDAP.pm +++ b/Bugzilla/Auth/LDAP.pm @@ -25,9 +25,8 @@ # Gervase Markham <gerv@gerv.net> # Christian Reis <kiko@async.com.br> # Bradley Baetz <bbaetz@acm.org> -# Erik Stambaugh <erik@dasbistro.com> -package Bugzilla::Auth::Verify::LDAP; +package Bugzilla::Auth::LDAP; use strict; @@ -36,15 +35,6 @@ use Bugzilla::Constants; use Net::LDAP; -# can_edit is now a hash. - -my $can_edit = { - 'new' => 0, - 'userid' => 0, - 'login_name' => 0, - 'realname' => 0, -}; - sub authenticate { my ($class, $username, $passwd) = @_; @@ -166,13 +156,15 @@ sub authenticate { return (AUTH_OK, $userid); } +sub can_edit { return 0; } + 1; __END__ =head1 NAME -Bugzilla::Auth::Verify::LDAP - LDAP based authentication for Bugzilla +Bugzilla::Auth::LDAP - LDAP based authentication for Bugzilla This is an L<authentication module|Bugzilla::Auth/"AUTHENTICATION"> for Bugzilla, which logs the user in using an LDAP directory. |