mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 11:43:47 -08:00
Only allow remote user settings to be saved if the app is not in demo mode
This commit is contained in:
parent
4a0e5e4b88
commit
1a64879b65
|
@ -478,6 +478,11 @@ class SettingsController extends Controller
|
||||||
$setting->two_factor_enabled = null;
|
$setting->two_factor_enabled = null;
|
||||||
} else {
|
} else {
|
||||||
$setting->two_factor_enabled = $request->input('two_factor_enabled');
|
$setting->two_factor_enabled = $request->input('two_factor_enabled');
|
||||||
|
|
||||||
|
# remote user login
|
||||||
|
$setting->login_remote_user_enabled = (int)$request->input('login_remote_user_enabled');
|
||||||
|
$setting->login_common_disabled= (int)$request->input('login_common_disabled');
|
||||||
|
$setting->login_remote_user_custom_logout_url = $request->input('login_remote_user_custom_logout_url');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -486,10 +491,6 @@ class SettingsController extends Controller
|
||||||
$setting->pwd_secure_min = (int) $request->input('pwd_secure_min');
|
$setting->pwd_secure_min = (int) $request->input('pwd_secure_min');
|
||||||
$setting->pwd_secure_complexity = '';
|
$setting->pwd_secure_complexity = '';
|
||||||
|
|
||||||
# remote user login
|
|
||||||
$setting->login_remote_user_enabled = (int)$request->input('login_remote_user_enabled');
|
|
||||||
$setting->login_common_disabled= (int)$request->input('login_common_disabled');
|
|
||||||
$setting->login_remote_user_custom_logout_url = $request->input('login_remote_user_custom_logout_url');
|
|
||||||
|
|
||||||
if ($request->has('pwd_secure_complexity')) {
|
if ($request->has('pwd_secure_complexity')) {
|
||||||
$setting->pwd_secure_complexity = implode('|', $request->input('pwd_secure_complexity'));
|
$setting->pwd_secure_complexity = implode('|', $request->input('pwd_secure_complexity'));
|
||||||
|
|
|
@ -123,27 +123,33 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<!-- Enable Remote User Login -->
|
<!-- Enable Remote User Login -->
|
||||||
{{ Form::checkbox('login_remote_user_enabled', '1', Input::old('login_remote_user_enabled', $setting->login_remote_user_enabled),array('class' => 'minimal')) }}
|
|
||||||
{{ Form::label('login_remote_user_enabled', trans('admin/settings/general.login_remote_user_enabled_text')) }}
|
|
||||||
{!! $errors->first('login_remote_user_enabled', '<span class="alert-msg">:message</span>') !!}
|
|
||||||
<p class="help-block">
|
|
||||||
{{ trans('admin/settings/general.login_remote_user_enabled_help') }}
|
|
||||||
</p>
|
|
||||||
<!-- Custom logout url to redirect to authentication provider -->
|
|
||||||
{{ Form::label('login_remote_user_custom_logout_url', trans('admin/settings/general.login_remote_user_custom_logout_url_text')) }}
|
|
||||||
{{ Form::text('login_remote_user_custom_logout_url', Input::old('login_remote_user_custom_logout_url', $setting->login_remote_user_custom_logout_url),array('class' => 'form-control')) }}
|
|
||||||
|
|
||||||
{!! $errors->first('login_remote_user_custom_logout_url', '<span class="alert-msg">:message</span>') !!}
|
@if (config('app.lock_passwords'))
|
||||||
<p class="help-block">
|
<p class="help-block">{{ trans('general.feature_disabled') }}</p>
|
||||||
{{ trans('admin/settings/general.login_remote_user_custom_logout_url_help') }}
|
@else
|
||||||
</p>
|
{{ Form::checkbox('login_remote_user_enabled', '1', Input::old('login_remote_user_enabled', $setting->login_remote_user_enabled),array('class' => 'minimal')) }}
|
||||||
<!-- Disable other logins mechanism -->
|
{{ Form::label('login_remote_user_enabled', trans('admin/settings/general.login_remote_user_enabled_text')) }}
|
||||||
{{ Form::checkbox('login_common_disabled', '1', Input::old('login_common_disabled', $setting->login_common_disabled),array('class' => 'minimal')) }}
|
{!! $errors->first('login_remote_user_enabled', '<span class="alert-msg">:message</span>') !!}
|
||||||
{{ Form::label('login_common_disabled', trans('admin/settings/general.login_common_disabled_text')) }}
|
<p class="help-block">
|
||||||
{!! $errors->first('login_common_disabled', '<span class="alert-msg">:message</span>') !!}
|
{{ trans('admin/settings/general.login_remote_user_enabled_help') }}
|
||||||
<p class="help-block">
|
</p>
|
||||||
{{ trans('admin/settings/general.login_common_disabled_help') }}
|
<!-- Custom logout url to redirect to authentication provider -->
|
||||||
</p>
|
{{ Form::label('login_remote_user_custom_logout_url', trans('admin/settings/general.login_remote_user_custom_logout_url_text')) }}
|
||||||
|
{{ Form::text('login_remote_user_custom_logout_url', Input::old('login_remote_user_custom_logout_url', $setting->login_remote_user_custom_logout_url),array('class' => 'form-control')) }}
|
||||||
|
|
||||||
|
{!! $errors->first('login_remote_user_custom_logout_url', '<span class="alert-msg">:message</span>') !!}
|
||||||
|
<p class="help-block">
|
||||||
|
{{ trans('admin/settings/general.login_remote_user_custom_logout_url_help') }}
|
||||||
|
</p>
|
||||||
|
<!-- Disable other logins mechanism -->
|
||||||
|
{{ Form::checkbox('login_common_disabled', '1', Input::old('login_common_disabled', $setting->login_common_disabled),array('class' => 'minimal')) }}
|
||||||
|
{{ Form::label('login_common_disabled', trans('admin/settings/general.login_common_disabled_text')) }}
|
||||||
|
{!! $errors->first('login_common_disabled', '<span class="alert-msg">:message</span>') !!}
|
||||||
|
<p class="help-block">
|
||||||
|
{{ trans('admin/settings/general.login_common_disabled_help') }}
|
||||||
|
</p>
|
||||||
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue