1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gogs_ynh.git synced 2024-09-03 20:36:23 +02:00

Force REQUIRE_SIGNIN_VIEW in private mode

This commit is contained in:
Josué Tille 2018-05-17 21:22:35 +02:00
parent 872b62f092
commit a40767b037
2 changed files with 8 additions and 1 deletions

View file

@ -32,7 +32,7 @@ REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = true ENABLE_NOTIFY_MAIL = true
DISABLE_REGISTRATION = true DISABLE_REGISTRATION = true
ENABLE_CAPTCHA = false ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false REQUIRE_SIGNIN_VIEW = __PRIVATE_MODE__
ENABLE_REVERSE_PROXY_AUTHENTICATION = true ENABLE_REVERSE_PROXY_AUTHENTICATION = true
ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = true ENABLE_REVERSE_PROXY_AUTO_REGISTERATION = true
[picture] [picture]

View file

@ -66,6 +66,13 @@ config_gogs() {
ynh_replace_string "__PORT__" $port "$final_path/custom/conf/app.ini" ynh_replace_string "__PORT__" $port "$final_path/custom/conf/app.ini"
ynh_replace_string "__APP__" $app "$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" ynh_store_file_checksum "$final_path/custom/conf/app.ini"
} }