mirror of
https://github.com/YunoHost-Apps/emailpoubelle_ynh.git
synced 2024-09-03 18:26:29 +02:00
[autopatch] Autopatch to migrate to new permission system
This commit is contained in:
parent
1e457ce1d4
commit
3c638a6e57
2 changed files with 14 additions and 4 deletions
|
@ -48,7 +48,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
|||
ynh_app_setting_set $app domain $domain
|
||||
ynh_app_setting_set $app path $path_url
|
||||
ynh_app_setting_set $app admin $admin
|
||||
ynh_app_setting_set $app is_public $is_public
|
||||
ynh_app_setting_set $app db_name $db_user
|
||||
ynh_app_setting_set $app final_path $final_path
|
||||
|
||||
|
@ -143,11 +142,12 @@ ynh_add_nginx_config
|
|||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
||||
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
if [ "$is_public" -eq 1 ]
|
||||
then
|
||||
# unprotected_uris allows SSO credentials to be passed anyway.
|
||||
ynh_app_setting_set $app unprotected_uris "/"
|
||||
ynh_permission_update --permission="main" --add="visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -73,6 +73,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