mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Removed port stuff, since LDAP ignores it anyway :-/
This commit is contained in:
parent
b03330aae0
commit
eec22c5aeb
|
@ -400,7 +400,6 @@ class SettingsController extends Controller
|
|||
$setting->ldap_server = e(Input::get('ldap_server'));
|
||||
$setting->ldap_server_cert_ignore = e(Input::get('ldap_server_cert_ignore', false));
|
||||
$setting->ldap_uname = e(Input::get('ldap_uname'));
|
||||
$setting->ldap_port = e(Input::get('ldap_port'));
|
||||
if (Input::has('ldap_pword')) {
|
||||
$setting->ldap_pword = Crypt::encrypt(Input::get('ldap_pword'));
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ class Ldap extends Model
|
|||
{
|
||||
|
||||
$ldap_host = Setting::getSettings()->ldap_server;
|
||||
$ldap_port = Setting::getSettings()->ldap_port;
|
||||
$ldap_version = Setting::getSettings()->ldap_version;
|
||||
$ldap_server_cert_ignore = Setting::getSettings()->ldap_server_cert_ignore;
|
||||
$ldap_use_tls = Setting::getSettings()->ldap_tls;
|
||||
|
@ -32,14 +31,14 @@ class Ldap extends Model
|
|||
|
||||
// If we are ignoring the SSL cert we need to setup the environment variable
|
||||
// before we create the connection
|
||||
if ($ldap_server_cert_ignore) {
|
||||
if ($ldap_server_cert_ignore=='1') {
|
||||
putenv('LDAPTLS_REQCERT=never');
|
||||
}
|
||||
|
||||
$connection = @ldap_connect($ldap_host,$ldap_port);
|
||||
$connection = @ldap_connect($ldap_host);
|
||||
|
||||
if (!$connection) {
|
||||
throw new Exception('Could not connect to LDAP server at '.$ldap_host.' on port '.$ldap_port.'. Please check your LDAP server name and port number in your settings.');
|
||||
throw new Exception('Could not connect to LDAP server at '.$ldap_host.'. Please check your LDAP server name and port number in your settings.');
|
||||
}
|
||||
|
||||
// Needed for AD
|
||||
|
|
|
@ -41,7 +41,7 @@ return array(
|
|||
'ldap_integration' => 'LDAP Integration',
|
||||
'ldap_settings' => 'LDAP Settings',
|
||||
'ldap_server' => 'LDAP Server',
|
||||
'ldap_server_help' => 'This should start with ldap:// or ldaps://',
|
||||
'ldap_server_help' => 'This should start with ldap:// (for unencrypted or TLS) or ldaps:// (for SSL)',
|
||||
'ldap_server_cert' => 'LDAP SSL certificate validation',
|
||||
'ldap_server_cert_ignore' => 'Allow invalid SSL Certificate',
|
||||
'ldap_server_cert_help' => 'Select this checkbox if you are using a self signed SSL cert and would like to accept an invalid SSL certificate.',
|
||||
|
@ -49,8 +49,6 @@ return array(
|
|||
'ldap_tls_help' => 'This should be checked only if you are running STARTTLS on your LDAP server. ',
|
||||
'ldap_uname' => 'LDAP Bind Username',
|
||||
'ldap_pword' => 'LDAP Bind Password',
|
||||
'ldap_port' => 'LDAP Port',
|
||||
'ldap_port_help' => 'This is usually 389 for ldap, 636 for ldaps.',
|
||||
'ldap_basedn' => 'Base Bind DN',
|
||||
'ldap_filter' => 'LDAP Filter',
|
||||
'ldap_username_field' => 'Username Field',
|
||||
|
|
|
@ -727,25 +727,6 @@
|
|||
</div>
|
||||
</div><!-- LDAP Server -->
|
||||
|
||||
<!-- LDAP port -->
|
||||
<div class="form-group {{ $errors->has('ldap_port') ? 'error' : '' }}">
|
||||
<div class="col-md-3">
|
||||
{{ Form::label('ldap_port', trans('admin/settings/general.ldap_port')) }}
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
@if (config('app.lock_passwords')===true)
|
||||
{{ Form::text('ldap_port', Input::old('ldap_port', $setting->ldap_port), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => '389')) }}
|
||||
@else
|
||||
{{ Form::text('ldap_port', Input::old('ldap_port', $setting->ldap_port), array('class' => 'form-control','placeholder' => '389')) }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-md-8 col-md-offset-3">
|
||||
|
||||
<p class="help-block">{{ trans('admin/settings/general.ldap_port_help') }}</p>
|
||||
{!! $errors->first('ldap_port', '<span class="alert-msg">:message</span>') !!}
|
||||
</div>
|
||||
</div><!-- LDAP Server -->
|
||||
|
||||
|
||||
<!-- Start TLS -->
|
||||
<div class="form-group">
|
||||
|
|
Loading…
Reference in a new issue