From f6c498cb7c0f0fa02bf8b086de864c95f9fef305 Mon Sep 17 00:00:00 2001 From: filesite Date: Tue, 12 Nov 2024 09:27:41 +0800 Subject: [PATCH] add default config of password auth --- conf/app.php | 4 ++++ themes/beauty/views/site/index.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/app.php b/conf/app.php index e93570e..392c1d2 100644 --- a/conf/app.php +++ b/conf/app.php @@ -198,6 +198,10 @@ $configs = array( //Google Adwords目标跟踪ID 'GAD_MEASUREMENT_ID' => '', + //密码授权默认关闭 + "password_auth" => array( + "enable" => false, + ), ); //自定义配置支持 diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 34c215b..37b1fff 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -8,7 +8,7 @@ $audioExts = !empty(FSC::$app['config']['supportedAudioExts']) ? FSC::$app['conf $supportedExts = array_merge($imgExts, $videoExts, $audioExts); //需密码授权的目录显示lock图标 -$authConfig = FSC::$app['config']['password_auth']; +$authConfig = !empty(FSC::$app['config']['password_auth']) ? FSC::$app['config']['password_auth'] : array(); $dir_ext_status = !empty($_COOKIE['dir_ext_status']) ? $_COOKIE['dir_ext_status'] : 'opened'; $menu_ext_status = !empty($_COOKIE['menu_ext_status']) ? $_COOKIE['menu_ext_status'] : FSC::$app['config']['defaultMenuStatusInPC'];