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 #=================================================