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

Merge pull request #12 from yunohost-bot/new-permission-system

[autopatch] Autopatch to migrate to new permission system
This commit is contained in:
yalh76 2021-05-15 14:45:42 +02:00 committed by GitHub
commit 67247ed8c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
#=================================================