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

[autopatch] Autopatch to migrate to new permission system

This commit is contained in:
Yunohost-Bot 2021-03-15 00:26:27 +01:00 committed by Alexandre Aubin
parent 6ec0311417
commit 5a3194383f
2 changed files with 14 additions and 3 deletions

View file

@ -51,7 +51,6 @@ ynh_webpath_register $app $domain $path_url
ynh_app_setting_set $app domain $domain
ynh_app_setting_set $app path $path_url
ynh_app_setting_set $app is_public $is_public
ynh_app_setting_set $app final_path $final_path
#=================================================
@ -105,10 +104,12 @@ chown -R root: $final_path
# SETUP SSOWAT
#=================================================
# Make app public if necessary
if [ $is_public -eq 1 ]
if [ "$is_public" -eq 1 ]
then
ynh_app_setting_set $app skipped_uris "/"
ynh_permission_update --permission="main" --add="visitors"
fi
#=================================================

View file

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