diff --git a/scripts/install b/scripts/install index f1409be..971a2f6 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index 53a4dc9..0c203bf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #=================================================