From 60f3584c5ecf889a59c25503cee08a4953410512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Wed, 25 Mar 2020 16:20:19 +0100 Subject: [PATCH] Add permission support --- manifest.json | 2 +- scripts/install | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/manifest.json b/manifest.json index 7837a45..8960822 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "id": "riot", "packaging_format": 1, "requirements": { - "yunohost": ">= 3.5.2.2" + "yunohost": ">= 3.7.0.6" }, "description": { "en": "A web client for matrix", diff --git a/scripts/install b/scripts/install index 3686ae5..5bb4bb4 100644 --- a/scripts/install +++ b/scripts/install @@ -57,11 +57,9 @@ ynh_script_progression --message="Protecting directory" set_permission ynh_script_progression --message="Configuring permissions" -if [ "$is_public" = "0" ]; -then # Retire l'accès public - ynh_app_setting_delete --app $app --key skipped_uris -else - ynh_app_setting_set --app $app --key unprotected_uris --value "/" +if [ "$is_public" == '1' ]; +then + ynh_permission_update --permission "main" --add "visitors" fi # Recharge la configuration Nginx