Skip to content

A free open source IT asset/license management system

Hides the “Disable Other Login Mechanisms” option via env

snipebbad84c6cc2c
diff --git a/.env.example b/.env.example
index 5c0a0b8abc..fef085324c 100644
--- a/.env.example
+++ b/.env.example
@@ -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
diff --git a/config/app.php b/config/app.php
index 44f2d26555..e3b3b91083 100755
--- a/config/app.php
+++ b/config/app.php
@@ -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),
+
];
diff --git a/resources/views/settings/security.blade.php b/resources/views/settings/security.blade.php
index 40dd28d8c5..f59bc3447b 100644
--- a/resources/views/settings/security.blade.php
+++ b/resources/views/settings/security.blade.php
@@ -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>