From abdd4eba8b321e66d9a86d2d3592893f69632618 Mon Sep 17 00:00:00 2001 From: "bugreport%peshkin.net" <> Date: Mon, 12 Jul 2004 10:48:45 +0000 Subject: Backing out bug 241900 --- defparams.pl | 68 +++++++++++++++--------------------------------------------- 1 file changed, 17 insertions(+), 51 deletions(-) (limited to 'defparams.pl') 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 # Bradley Baetz # Joseph Heenan -# Erik Stambaugh # # 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. - - More than one may be selected. If the first one returns nothing, - the second is tried, and so on.
- The types are: -
-
CGI
-
- Asks for username and password via CGI form interface. -
-
', - 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.
- The types are: + name => 'loginmethod', + desc => 'The type of login authentication to use:
DB
@@ -484,9 +450,9 @@ sub find_languages {
', type => 's', - choices => [ 'DB', 'LDAP', 'DB,LDAP', 'LDAP,DB' ], + choices => [ 'DB', 'LDAP' ], default => 'DB', - checker => \&check_user_verify_method + checker => \&check_loginmethod }, { -- cgit v1.2.3-24-g4f1b