From a40767b0374277b682bc44173cf2c0b5ccfcba12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Thu, 17 May 2018 21:22:35 +0200 Subject: [PATCH] Force REQUIRE_SIGNIN_VIEW in private mode --- conf/app.ini | 2 +- scripts/_common.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conf/app.ini b/conf/app.ini index 2e4e3e8..dc3ef61 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -32,7 +32,7 @@ REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = true DISABLE_REGISTRATION = true ENABLE_CAPTCHA = false -REQUIRE_SIGNIN_VIEW = false +REQUIRE_SIGNIN_VIEW = __PRIVATE_MODE__ ENABLE_REVERSE_PROXY_AUTHENTICATION = true ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = true [picture] diff --git a/scripts/_common.sh b/scripts/_common.sh index 0288b2b..ee118c6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -66,6 +66,13 @@ config_gogs() { ynh_replace_string "__PORT__" $port "$final_path/custom/conf/app.ini" ynh_replace_string "__APP__" $app "$final_path/custom/conf/app.ini" + if [[ "$is_public" = '1' ]] + then + ynh_replace_string "__PRIVATE_MODE__" "false" "$final_path/custom/conf/app.ini" + else + ynh_replace_string "__PRIVATE_MODE__" "true" "$final_path/custom/conf/app.ini" + fi + ynh_store_file_checksum "$final_path/custom/conf/app.ini" }