mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
Fix permissions
This commit is contained in:
parent
4d5c3434d0
commit
b339550bf8
5 changed files with 25 additions and 10 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"name": "eric_G"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.8.1"
|
||||
"yunohost": ">= 4.0.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -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
|
||||
#=================================================
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue