mirror of
https://github.com/YunoHost-Apps/freshrss_ynh.git
synced 2024-09-03 18:36:33 +02:00
[autopatch] Autopatch to migrate to new permission system
This commit is contained in:
parent
8a6c9d2750
commit
e41d5565a3
2 changed files with 14 additions and 3 deletions
|
@ -146,11 +146,12 @@ chown -R $app: $final_path/{data,extensions}
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring SSOwat..."
|
ynh_script_progression --message="Configuring SSOwat..."
|
||||||
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
|
|
||||||
#skip api directory
|
#skip api directory
|
||||||
ynh_app_setting_set --app="$app" --key=skipped_uris --value="/api/,/scripts/api.js"
|
|
||||||
ynh_app_setting_delete --app="$app" --key=unprotected_regex
|
|
||||||
ynh_app_setting_delete --app="$app" --key=unprotected_uris
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
|
@ -71,6 +71,16 @@ ynh_clean_setup () {
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
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
|
# CHECK THE PATH
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue