From 21216e1cabf7886b07921b838909a87eb412c050 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 16 Apr 2022 19:33:59 +0200 Subject: [PATCH] add-sso --- check_process | 2 +- hooks/post_app_addaccess | 4 ++-- hooks/post_app_removeaccess | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/check_process b/check_process index b570167..4f85a24 100644 --- a/check_process +++ b/check_process @@ -19,7 +19,7 @@ #Last version upgrade=1 from_commit=79c6c4ad03f62d2ed4f4180ac6b7dac1c117a62a #v0.6.6 -# upgrade=1 from_commit=11f5b96df7d8850beff47f9904745fa53a6f7ed9 +# upgrade=0 from_commit=11f5b96df7d8850beff47f9904745fa53a6f7ed9 backup_restore=1 multi_instance=1 port_already_use=1 (8083) diff --git a/hooks/post_app_addaccess b/hooks/post_app_addaccess index edef7b3..3824e0e 100644 --- a/hooks/post_app_addaccess +++ b/hooks/post_app_addaccess @@ -5,8 +5,8 @@ source /usr/share/yunohost/helpers app=$1 users=$2 # Tous les utilisateurs autorisés sur l'app. Séparés par des virgules. -if [ echo "$users" | grep visitors ]; then - if [ tail /etc/yunohost/apps/$app/conf/nginx.conf | grep " proxy_set_header X-Remote-User" ]; then +if echo "$users" | grep visitors ; then + if tail /etc/yunohost/apps/$app/conf/nginx.conf | grep " proxy_set_header X-Remote-User"; then #app is made public ynh_replace_string " proxy_set_header X-Remote-User" "# proxy_set_header X-Remote-User" /etc/yunohost/apps/$app/conf/nginx.conf ynh_add_nginx_config diff --git a/hooks/post_app_removeaccess b/hooks/post_app_removeaccess index 5bd52ee..469e041 100644 --- a/hooks/post_app_removeaccess +++ b/hooks/post_app_removeaccess @@ -5,8 +5,8 @@ source /usr/share/yunohost/helpers app=$1 users=$2 # Tous les utilisateurs autorisés sur l'app. Séparés par des virgules. -if [ ! echo "$users" | grep visitors ]; then - if [ tail /etc/yunohost/apps/$app/conf/nginx.conf | grep "# proxy_set_header X-Remote-User" ]; then +if ! echo "$users" | grep visitors; then + if tail /etc/yunohost/apps/$app/conf/nginx.conf | grep "# proxy_set_header X-Remote-User" ; then #app is made public ynh_replace_string "# proxy_set_header X-Remote-User" " proxy_set_header X-Remote-User" /etc/yunohost/apps/$app/conf/nginx.conf ynh_add_nginx_config