1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/garradin_ynh.git synced 2024-09-03 18:36:17 +02:00

try to fix unskipped uris obsolete

This commit is contained in:
Robles Rodolphe 2020-04-29 01:57:58 +02:00
parent 637a7f282d
commit c43d47071f

View file

@ -56,7 +56,7 @@ fi
### then you may safely remove these lines ### then you may safely remove these lines
# Cleaning legacy permissions # Cleaning legacy permissions
is_public=$(ynh_app_setting_get --app=$app --key=is_public) # is_public=$(ynh_app_setting_get --app=$app --key=is_public)
if [ -n "$is_public" ]; then if [ -n "$is_public" ]; then
# Remove unprotected_uris # Remove unprotected_uris
@ -66,7 +66,7 @@ if [ -n "$is_public" ]; then
#Removing skipped/unprotected_uris under certain conditions, remove the visitors group added during the migration process of 3.7 #Removing skipped/unprotected_uris under certain conditions, remove the visitors group added during the migration process of 3.7
#Remove skipped_uris. If the app was public, add visitors again to the main permission #Remove skipped_uris. If the app was public, add visitors again to the main permission
if ynh_permission_has_user --permission=main --user=visitors elif ynh_permission_has_user --permission=main --user=visitors
then then
ynh_app_setting_delete --app=$app --key=skipped_uris ynh_app_setting_delete --app=$app --key=skipped_uris
ynh_permission_update --permission "main" --add "visitors" ynh_permission_update --permission "main" --add "visitors"
@ -216,10 +216,10 @@ ynh_script_progression --message="Upgrading permissions configuration..." --time
# ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" # ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
# fi # fi
# Create the admin permission if needed # Create the visitors permission if needed
# if ! ynh_permission_exists --permission "all_users"; then if ! ynh_permission_exists --permission "visitors"; then
# ynh_permission_create --permission "all_users" --url "/admin" --allowed $admin ynh_permission_create --permission "visitors" --url "/admin" --allowed $admin
# fi fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX