require the Net::LDAP module for all installs
This commit is contained in:
@@ -129,8 +129,7 @@ to Netdisco in the C<X-REMOTE_USER> HTTP Header. For example with Apache:
|
||||
Value: Settings Tree. Default: None.
|
||||
|
||||
If set, and a user has the C<ldap> flag also set on their account, then LDAP
|
||||
authentication will be used for their login. You I<must> install the
|
||||
L<Net::LDAP> Perl module in order to use this feature. For example:
|
||||
authentication will be used for their login.
|
||||
|
||||
ldap:
|
||||
servers:
|
||||
|
||||
@@ -12,6 +12,7 @@ use Dancer ':syntax';
|
||||
use Dancer::Plugin::DBIC;
|
||||
use Dancer::Plugin::Passphrase;
|
||||
use Digest::MD5;
|
||||
use Net::LDAP;
|
||||
|
||||
sub authenticate_user {
|
||||
my ($self, $username, $password) = @_;
|
||||
@@ -99,9 +100,6 @@ sub match_with_local_pass {
|
||||
sub match_with_ldap {
|
||||
my($self, $pass, $user) = @_;
|
||||
|
||||
eval 'require Net::LDAP';
|
||||
if ($@) {error $@; return}
|
||||
|
||||
return unless setting('ldap') and ref {} eq ref setting('ldap');
|
||||
my $conf = setting('ldap');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user