summaryrefslogtreecommitdiffstats
path: root/defparams.pl
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2004-07-12 12:48:45 +0200
committerbugreport%peshkin.net <>2004-07-12 12:48:45 +0200
commitabdd4eba8b321e66d9a86d2d3592893f69632618 (patch)
tree305a5c0f7857f37f576b0969dc46f9ff2950b14a /defparams.pl
parentce983f5d751e61c5500eac45e5db29eee7309520 (diff)
downloadbugzilla-abdd4eba8b321e66d9a86d2d3592893f69632618.tar.gz
bugzilla-abdd4eba8b321e66d9a86d2d3592893f69632618.tar.xz
Backing out bug 241900
Diffstat (limited to 'defparams.pl')
-rw-r--r--defparams.pl68
1 files changed, 17 insertions, 51 deletions
diff --git a/defparams.pl b/defparams.pl
index b067d583a..6861d0447 100644
--- a/defparams.pl
+++ b/defparams.pl
@@ -25,7 +25,6 @@
# J. Paul Reed <preed@sigkill.com>
# Bradley Baetz <bbaetz@student.usyd.edu.au>
# Joseph Heenan <joseph@heenan.me.uk>
-# Erik Stambaugh <erik@dasbistro.com>
#
# This file defines all the parameters that we have a GUI to edit within
@@ -128,7 +127,7 @@ sub check_netmask {
return "";
}
-sub check_user_verify_method {
+sub check_loginmethod {
# doeditparams traverses the list of params, and for each one it checks,
# then updates. This means that if one param checker wants to look at
# other params, it must be below that other one. So you can't have two
@@ -137,20 +136,18 @@ sub check_user_verify_method {
# the login method as LDAP, we won't notice, but all logins will fail.
# So don't do that.
- my ($list, $entry) = @_;
- for my $method (split /,\s*/, $list) {
- my $res = check_multi($method, $entry);
- return $res if $res;
- if ($method eq 'DB') {
- # No params
- } elsif ($method eq 'LDAP') {
- eval "require Net::LDAP";
- return "Error requiring Net::LDAP: '$@'" if $@;
- return "LDAP servername is missing" unless Param("LDAPserver");
- return "LDAPBaseDN is empty" unless Param("LDAPBaseDN");
- } else {
- return "Unknown user_verify_method '$method' in check_user_verify_method";
- }
+ my ($method, $entry) = @_;
+ my $res = check_multi($method, $entry);
+ return $res if $res;
+ if ($method eq 'DB') {
+ # No params
+ } elsif ($method eq 'LDAP') {
+ eval "require Net::LDAP";
+ return "Error requiring Net::LDAP: '$@'" if $@;
+ return "LDAP servername is missing" unless Param("LDAPserver");
+ return "LDAPBaseDN is empty" unless Param("LDAPBaseDN");
+ } else {
+ return "Unknown loginmethod '$method' in check_loginmethod";
}
return "";
}
@@ -435,40 +432,9 @@ sub find_languages {
default => '',
},
- # in the future:
- #
- # user_verify_method and user_info_method should have choices gathered from
- # whatever sits in their respective directories
- #
- # rather than comma-separated lists, these two should eventually become
- # arrays, but that requires alterations to editparams first
-
- {
- name => 'user_info_method',
- desc => 'Methods to be used for gathering a user\'s login information.
- <add>
- More than one may be selected. If the first one returns nothing,
- the second is tried, and so on.<br />
- The types are:
- <dl>
- <dt>CGI</dt>
- <dd>
- Asks for username and password via CGI form interface.
- </dd>
- </dl>',
- type => 's',
- choices => [ 'CGI' ],
- default => 'CGI',
- checker => \&check_multi
- },
-
{
- name => 'user_verify_method',
- desc => 'Methods to be used for verifying (authenticating) information
- gathered by user_info_method.
- More than one may be selected. If the first one cannot find the
- user, the second is tried, and so on.<br />
- The types are:
+ name => 'loginmethod',
+ desc => 'The type of login authentication to use:
<dl>
<dt>DB</dt>
<dd>
@@ -484,9 +450,9 @@ sub find_languages {
</dd>
</dl>',
type => 's',
- choices => [ 'DB', 'LDAP', 'DB,LDAP', 'LDAP,DB' ],
+ choices => [ 'DB', 'LDAP' ],
default => 'DB',
- checker => \&check_user_verify_method
+ checker => \&check_loginmethod
},
{