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

Add new permissions

This commit is contained in:
ericgaspar 2021-02-06 11:29:58 +01:00
parent e0e5531f66
commit 3b5d9d9ec0
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 12 additions and 18 deletions

View file

@ -235,13 +235,12 @@ ynh_add_fail2ban_config --logpath="/var/log/${app}FailedLogins.log" --failregex=
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT
#================================================= #=================================================
ynh_script_progression --message="Configuring SSOwat..." ynh_script_progression --message="Configuring permissions..."
# Protect URIs if private # Make app public if necessary
if [ $is_public -eq 0 ] if [ $is_public -eq 1 ]
then then
ynh_app_setting_delete --app=$app --key=unprotected_uris ynh_permission_update --permission="main" --add="visitors"
ynh_app_setting_set --app=$app --key=protected_uris --value="/"
fi fi
#================================================= #=================================================

View file

@ -74,6 +74,13 @@ then
ynh_app_setting_delete --app=$app --key=path_url ynh_app_setting_delete --app=$app --key=path_url
fi fi
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
@ -121,7 +128,7 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=6 ynh_script_progression --message="Upgrading dependencies..." --weight=6
ynh_install_app_dependencies "$pkg_dependencies" ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# CREATE DEDICATED USER # CREATE DEDICATED USER
@ -274,18 +281,6 @@ ynh_add_fail2ban_config --logpath="/var/log/${app}FailedLogins.log" --failregex=
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..."
# Protect URIs if private
if [ $is_public -eq 0 ]
then
ynh_app_setting_delete --app=$app --key=unprotected_uris
ynh_app_setting_set --app=$app --key=protected_uris --value="/"
fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================