mirror of
https://github.com/YunoHost-Apps/ffsync_ynh.git
synced 2024-09-03 18:26:38 +02:00
Add new permission correctly
This commit is contained in:
parent
64692d6a01
commit
9e2cd8392f
2 changed files with 10 additions and 13 deletions
|
@ -133,7 +133,7 @@ set_permissions
|
|||
ynh_script_progression --message="Configuring permissions"
|
||||
# accessible by everyone (authentification is done by firefox accounts)
|
||||
|
||||
|
||||
ynh_permission_update --permission=main --add=visitors --protected=true --show_tile=true
|
||||
|
||||
#=================================================
|
||||
# RELOAD Services
|
||||
|
|
|
@ -88,16 +88,6 @@ 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
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -165,10 +155,17 @@ ynh_script_progression --message="Securing files and directories..."
|
|||
set_permissions
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
# Migrate legacy permissions to new system
|
||||
#=================================================
|
||||
|
||||
ynh_app_setting_set --app=$app --key=skipped_uris --value="/"
|
||||
ynh_script_progression --message="Set permissions..."
|
||||
if ynh_legacy_permissions_exists
|
||||
then
|
||||
ynh_legacy_permissions_delete_all
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
fi
|
||||
ynh_permission_update --permission=main --add=visitors --protected=true --show_tile=true
|
||||
|
||||
|
||||
ynh_script_progression --message="Restarting $app services..." --weight=3
|
||||
ynh_systemd_action --service_name "uwsgi-app@$app.service" \
|
||||
|
|
Loading…
Reference in a new issue