1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/adminer_ynh.git synced 2024-09-03 18:06:06 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2021-08-01 23:24:39 +02:00
parent b731551398
commit 60f5eef99c
No known key found for this signature in database
GPG key ID: 574F281483054D44

View file

@ -43,11 +43,31 @@ ynh_clean_setup () {
ynh_abort_if_errors
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
### If nobody installed your app before 4.1,
### then you may safely remove these lines
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
if ! ynh_permission_exists --permission="admin"; then
# Create the required permissions
ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin
fi
#=================================================
# CREATE DEDICATED USER
#=================================================