From bbad84c6cc2ce064401cacddc5c6d1b85313e437 Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 22 Jul 2024 10:13:59 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Hides=20the=20=E2=80=9CDisable=20Other=20Lo?= =?UTF-8?q?gin=20Mechanisms=E2=80=9D=20option=20via=20env?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: snipe --- .env.example | 1 + config/app.php | 14 ++++++++++++++ resources/views/settings/security.blade.php | 5 +++++ 3 files changed, 20 insertions(+) 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 @@

{{ trans('admin/settings/general.login_remote_user_custom_logout_url_help') }}

+ + @if (($setting->login_remote_user_enabled == '1') && (config('app.show_remote_login_only_option') != false)) +