1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jeedom_ynh.git synced 2024-09-03 19:26:26 +02:00

[autopatch] Autopatch to migrate to new permission system

This commit is contained in:
Yunohost-Bot 2021-03-15 00:26:20 +01:00 committed by Alexandre Aubin
parent 11bf4d19e6
commit 234e92a0db
2 changed files with 13 additions and 2 deletions

View file

@ -175,12 +175,13 @@ chown www-data:www-data -R /tmp/jeedom
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..."
ynh_permission_update --permission="main" --add="visitors"
# Remove the public access
ynh_app_setting_delete --app=$app --key=skipped_uris
# Access to API without SSO
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/core/api/jeeApi.php"
#=================================================
# RELOAD NGINX

View file

@ -75,6 +75,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
#=================================================