Hides the “Disable Other Login Mechanisms” option via env

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-07-22 10:13:59 +01:00
parent f2acb98afa
commit bbad84c6cc
3 changed files with 20 additions and 0 deletions

View file

@ -184,6 +184,7 @@ REQUIRE_SAML=false
API_THROTTLE_PER_MINUTE=120
CSV_ESCAPE_FORMULAS=true
LIVEWIRE_URL_PREFIX=null
SHOW_REMOTE_LOGIN_ONLY_OPTION=false
# --------------------------------------------
# OPTIONAL: HASHING

View file

@ -428,4 +428,18 @@ return [
'escape_formulas' => env('CSV_ESCAPE_FORMULAS', true),
/*
|--------------------------------------------------------------------------
| Show Remote Login Options
|--------------------------------------------------------------------------
|
| This determins whether or not to display the remote login options under Security.
| Most people won't need this, and if you don't have remote login configured
| and working correctly, you can lock yourself out of the system by enabling that
| option in the Admin Settings > Security section.
|
*/
'show_remote_login_only_option' => env('SHOW_REMOTE_LOGIN_ONLY_OPTION', false),
];

View file

@ -150,6 +150,9 @@
<p class="help-block">
{{ trans('admin/settings/general.login_remote_user_custom_logout_url_help') }}
</p>
@if (($setting->login_remote_user_enabled == '1') && (config('app.show_remote_login_only_option') != false))
<!-- Disable other logins mechanism -->
<label class="form-control">
@ -160,6 +163,8 @@
<p class="help-block">
{{ trans('admin/settings/general.login_common_disabled_help') }}
</p>
@endif
@endif
</div>