set decryption and set pword in migraiton

This commit is contained in:
Walter
2015-11-22 23:08:18 -05:00
parent 840e5b1523
commit 6ea3bedb9e
2 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ class AddLdapFieldsToSettings extends Migration {
$table->string('ldap_enabled')->nullable()->default(NULL);
$table->string('ldap_server')->nullable()->default(NULL);
$table->string('ldap_uname')->nullable()->default(NULL);
$table->string('ldap_pword')->nullable()->default(NULL);
$table->longText('ldap_pword')->nullable()->default('eyJpdiI6IllDdUU1NUtXWGd1Tzg0dGdvY0JtU3JUS2VEcDhEbEs1UFB4cFh3STJEVVk9IiwidmFsdWUiOiJ2UFwvN1VIZ3hJZmJLdHNyejlIK0RVT0d5VUgyYVFIeEpFT0xyUExJQjRIWT0iLCJtYWMiOiI3MTIzNTliYzczMWJlNTViZmRiNDg0MjI5MDhkMzdhN2RkNmUxMmFiZDlmYWNmNGY3YzcxYzQ4MTY1NDIwN2UyIn0=');
$table->string('ldap_basedn')->nullable()->default(NULL);
$table->string('ldap_filter')->nullable()->default('cn=*');
$table->string('ldap_username_field')->nullable()->default('samaccountname');

View File

@@ -327,9 +327,9 @@
</div>
<div class="col-md-9">
@if (Config::get('app.lock_passwords')===true)
{{ Form::text('ldap_pword', Input::old('ldap_pword', $setting->ldap_pword), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'binduserpassword')) }}
{{ Form::text('ldap_pword', Input::old('ldap_pword', Crypt::decrypt($setting->ldap_pword)), array('class' => 'form-control', 'disabled'=>'disabled','placeholder' => 'binduserpassword')) }}
@else
{{ Form::text('ldap_pword', Input::old('ldap_pword', $setting->ldap_pword), array('class' => 'form-control','placeholder' => 'binduserpassword')) }}
{{ Form::text('ldap_pword', Input::old('ldap_pword', Crypt::decrypt($setting->ldap_pword)), array('class' => 'form-control','placeholder' => 'binduserpassword')) }}
@endif
{{ $errors->first('ldap_pword', '<br><span class="alert-msg">:message</span>') }}