1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lutim_ynh.git synced 2024-09-03 19:36:24 +02:00

Merge pull request #45 from YunoHost-Apps/testing

Fix migration to new permission system
This commit is contained in:
Maniack Crudelis 2020-03-12 18:58:15 +01:00 committed by GitHub
commit 2076be0130
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 3 deletions

View file

@ -4,6 +4,11 @@ Changelog
## Unreleased ## Unreleased
- Nothing for now... - Nothing for now...
## [0.11.6~ynh3](https://github.com/YunoHost-Apps/lutim_ynh/pull/45) - 2020-03-12
#### Changed
- [ Fix migration to new permission system](https://github.com/YunoHost-Apps/lutim_ynh/pull/45/commits/e0d3764ffbcde3d354b7c27154f829cad8172e2e)
## [0.11.6~ynh2](https://github.com/YunoHost-Apps/lutim_ynh/pull/43) - 2020-01-04 ## [0.11.6~ynh2](https://github.com/YunoHost-Apps/lutim_ynh/pull/43) - 2020-01-04
#### Fixed #### Fixed

View file

@ -6,7 +6,7 @@
"en": "Self hosting images and sharing anonymous application", "en": "Self hosting images and sharing anonymous application",
"fr": "Application d'hébergement et de partage d'images anonyme" "fr": "Application d'hébergement et de partage d'images anonyme"
}, },
"version": "0.11.6~ynh2", "version": "0.11.6~ynh3",
"url": "https://lut.im", "url": "https://lut.im",
"license": "AGPL-3.0", "license": "AGPL-3.0",
"maintainer": { "maintainer": {

View file

@ -192,7 +192,7 @@ yunohost service add $app --log $final_path/log/production.log
#================================================= #=================================================
ynh_script_progression --message="Configuring SSOwat..." ynh_script_progression --message="Configuring SSOwat..."
ynh_app_setting_set --app=$app --key=skipped_uris --value="/" ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
if [ $is_public -eq 0 ] if [ $is_public -eq 0 ]
then then
# If the app is private, viewing images stays publicly accessible. # If the app is private, viewing images stays publicly accessible.

View file

@ -100,6 +100,10 @@ then
ynh_exec_quiet yunohost firewall disallow TCP $port ynh_exec_quiet yunohost firewall disallow TCP $port
fi fi
# Replace skipped_uris by unprotected_uris for the migration to the new permission system.
ynh_app_setting_delete --app=$app --key=skipped_uris
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
@ -258,7 +262,7 @@ chown $app -R /var/log/$app
#================================================= #=================================================
ynh_script_progression --message="Upgrading SSOwat configuration..." ynh_script_progression --message="Upgrading SSOwat configuration..."
ynh_app_setting_set --app=$app --key=skipped_uris --value="/" ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
if [ $is_public -eq 0 ] if [ $is_public -eq 0 ]
then then
# If the app is private, viewing images stays publicly accessible. # If the app is private, viewing images stays publicly accessible.