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:
parent
f55ce52e01
commit
632836545e
1 changed files with 12 additions and 3 deletions
|
@ -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
|
||||||
basicauthcreate=$YNH_APP_ARG_BASICAUTHCREATE
|
|
||||||
basicauthname=$YNH_APP_ARG_BASICAUTHNAME
|
# No basic auth if app is private
|
||||||
basicauthpass=$YNH_APP_ARG_BASICAUTHPASS
|
if [ "$is_public" = "Yes" ];
|
||||||
|
then
|
||||||
|
basicauthcreate=$YNH_APP_ARG_BASICAUTHCREATE
|
||||||
|
basicauthname=$YNH_APP_ARG_BASICAUTHNAME
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in a new issue