1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cops_ynh.git synced 2024-09-03 18:25:57 +02:00

No basicauth if app is private

This commit is contained in:
polytan02 2016-12-24 02:00:25 +00:00
parent f55ce52e01
commit 632836545e

View file

@ -17,9 +17,16 @@ path=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
runninguser=$YNH_APP_ARG_RUNNINGUSER runninguser=$YNH_APP_ARG_RUNNINGUSER
calibre=$YNH_APP_ARG_CALIBRE calibre=$YNH_APP_ARG_CALIBRE
# No basic auth if app is private
if [ "$is_public" = "Yes" ];
then
basicauthcreate=$YNH_APP_ARG_BASICAUTHCREATE basicauthcreate=$YNH_APP_ARG_BASICAUTHCREATE
basicauthname=$YNH_APP_ARG_BASICAUTHNAME basicauthname=$YNH_APP_ARG_BASICAUTHNAME
basicauthpass=$YNH_APP_ARG_BASICAUTHPASS basicauthpass=$YNH_APP_ARG_BASICAUTHPASS
else
basicauthcreate="No"
fi
# We check variables are not empty # We check variables are not empty
CHECK_VAR () { # Vérifie que la variable n'est pas vide. CHECK_VAR () { # Vérifie que la variable n'est pas vide.
@ -158,6 +165,8 @@ is_public=$(ynh_app_setting_get $app is_public)
if [ "$is_public" = "Yes" ]; if [ "$is_public" = "Yes" ];
then then
ynh_app_setting_set $app skipped_uris "/" ynh_app_setting_set $app skipped_uris "/"
else
echo "nothing";
fi fi
# Reload Nginx and regenerate SSOwat conf # Reload Nginx and regenerate SSOwat conf