From 5723419a519320f1f5e68eecb32c86abf24fed48 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 12 Aug 2022 15:59:52 +0200 Subject: [PATCH] Fix --- manifest.json | 5 +++++ scripts/upgrade | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/manifest.json b/manifest.json index 4891316..6a42fb3 100644 --- a/manifest.json +++ b/manifest.json @@ -38,6 +38,11 @@ "example": "/hydrogen", "default": "/hydrogen" }, + { + "name": "is_public", + "type": "boolean", + "default": true + }, { "name": "default_server", "type": "string", diff --git a/scripts/upgrade b/scripts/upgrade index ca6851a..b9f889e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -92,6 +92,19 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# SETUP SSOWAT +#================================================= +ynh_script_progression --message="Configuring permissions..." --time --weight=1 + +# Make app public if necessary +if [ $is_public -eq 1 ] +then + # Everyone can access the app. + # The "main" permission is automatically created before the install script. + ynh_permission_update --permission="main" --add="visitors" +fi + #================================================= # NGINX CONFIGURATION #=================================================