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:
parent
b731551398
commit
60f5eef99c
1 changed files with 21 additions and 1 deletions
|
@ -43,11 +43,31 @@ ynh_clean_setup () {
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
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
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue