1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/couchpotato_ynh.git synced 2024-09-03 18:16:22 +02:00

[autopatch] Autopatch to migrate to new permission system

This commit is contained in:
Yunohost-Bot 2021-03-15 00:25:39 +01:00 committed by Alexandre Aubin
parent 2e7405c02e
commit 0506f4b6c5
2 changed files with 12 additions and 1 deletions

View file

@ -268,9 +268,10 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..."
ynh_permission_update --permission="main" --add="visitors"
# Open the /api path so that external applications can connect
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/api"
#=================================================
# RELOAD NGINX

View file

@ -81,6 +81,16 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# Migrate legacy permissions to new system
#=================================================
if ynh_legacy_permissions_exists
then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#=================================================
# CHECK THE PATH
#=================================================