diff --git a/README.md b/README.md index d4838f7..c47715d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ You can access Etherpad's admin panel at `domain.tld/admin`. The configuration f ## Documentation - * Official documentation: http://etherpad.org/doc/v1.8.6 + * Official documentation: http://etherpad.org/doc/v1.8.7 * YunoHost documentation: https://yunohost.org/#/app_etherpad ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index 7f6b6f8..4780b48 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,7 +32,7 @@ Vous pouvez accéder au panneau d'administration d'Etherpad à l'adresse `domain ## Documentation - * Documentation officielle : http://etherpad.org/doc/v1.8.6 + * Documentation officielle : http://etherpad.org/doc/v1.8.7 * Documentation YunoHost : https://yunohost.org/#/app_etherpad ## Fonctionnalités spécifiques à YunoHost diff --git a/manifest.json b/manifest.json index 779dc26..40b98e0 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.0.0" }, "multi_instance": true, "services": [ diff --git a/scripts/install b/scripts/install index 274e9fd..6189138 100644 --- a/scripts/install +++ b/scripts/install @@ -60,7 +60,7 @@ ynh_app_setting_set --app=$app --key=password --value=$password #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Configuring firewall..." --weight=1 +ynh_script_progression --message="Finding an available port..." --weight=1 # Find an available port port=$(ynh_find_port --port=9001) @@ -189,14 +189,17 @@ ynh_systemd_action --service_name=$app --action=restart --log_path=systemd --lin #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary if [ $is_public -eq 1 ] then - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" fi +# Only the admin can access the admin panel of the app (if the app has an admin panel) +ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin + #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index aad4919..9c07e5c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -50,6 +50,18 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path 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 + +if ! ynh_permission_exists --permission="admin"; then + # Create the required permissions + ynh_permission_create --permission="admin" --url="/admin" --allowed=$admin +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -117,11 +129,11 @@ ynh_system_user_create --username=$app # #================================================= # ynh_script_progression --message="Installing Etherpad..." --weight=90 -chown -R $app: $final_path +# chown -R $app: $final_path - pushd "$final_path" - ynh_exec_as $app env "$ynh_node_load_PATH" bin/installDeps.sh - popd +# pushd "$final_path" +# ynh_exec_as $app env "$ynh_node_load_PATH" bin/installDeps.sh +# popd #================================================= # MODIFY A CONFIG FILE