Add public access only if already there
This commit is contained in:
parent
65e0c8e926
commit
e5f2a4510a
|
@ -59,17 +59,19 @@ fi
|
||||||
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 skipped_uris
|
|
||||||
ynh_app_setting_delete --app=$app --key=skipped_uris
|
|
||||||
# Remove unprotected_uris
|
# Remove unprotected_uris
|
||||||
ynh_app_setting_delete --app=$app --key=unprotected_uris
|
ynh_app_setting_delete --app=$app --key=unprotected_uris
|
||||||
# Remove protected_uris
|
# Remove protected_uris
|
||||||
ynh_app_setting_delete --app=$app --key=protected_uris
|
ynh_app_setting_delete --app=$app --key=protected_uris
|
||||||
|
|
||||||
# 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
|
||||||
# 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 [ $is_public -eq 1 ]; then
|
if ynh_permission_has_user --permission=main --user=visitors
|
||||||
|
then
|
||||||
|
ynh_app_setting_delete --app=$app --key=skipped_uris
|
||||||
ynh_permission_update --permission "main" --add "visitors"
|
ynh_permission_update --permission "main" --add "visitors"
|
||||||
|
else
|
||||||
|
ynh_app_setting_delete --app=$app --key=skipped_uris
|
||||||
fi
|
fi
|
||||||
ynh_app_setting_delete --app=$app --key=is_public
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user