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:
parent
11bf4d19e6
commit
234e92a0db
2 changed files with 13 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue