mirror of
https://github.com/YunoHost-Apps/nodered_ynh.git
synced 2024-09-03 19:46:25 +02:00
Attempt to fix check_process and permissions testing after upgrade
This commit is contained in:
parent
14b4b6091f
commit
61df0e8726
2 changed files with 12 additions and 6 deletions
|
@ -3,8 +3,7 @@
|
|||
domain="domain.tld"
|
||||
path="/path"
|
||||
admin="john"
|
||||
password="pass"
|
||||
port="666"
|
||||
is_public=1
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
@ -24,7 +23,7 @@ Notification=none
|
|||
;;; Upgrade options
|
||||
; commit=453b13703bb418a7da33ed4f3e96a486b365d865
|
||||
name=v1.2.9 2021-02-20
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&port=666&
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1&
|
||||
; commit=2b01dad6ce2214a07f8b5dd63ee040c34268204c
|
||||
name=Merge pull request #26 from YunoHost-Apps/testing
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&password=pass&port=666&
|
||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&is_public=1&
|
||||
|
|
|
@ -61,14 +61,21 @@ fi
|
|||
|
||||
# After 1.3.5~ynh2, permissions have been reworked
|
||||
if ynh_permission_exists --permission="admin"; then
|
||||
# Delete the admin permission, we use main for that now
|
||||
# Delete the admin permission
|
||||
ynh_permission_delete --permission="admin"
|
||||
# We use main as admin permission
|
||||
ynh_permission_url --permission="main" --url="/admin"
|
||||
ynh_permission_update --permission="main" --remove="visitors"
|
||||
# Create ui permission, for the dashboard
|
||||
ynh_permission_create --permission="ui" --url="/ui" --show_tile=true
|
||||
# Create endpoints permission
|
||||
ynh_permission_create --permission="endpoints" --url="/" --show_tile=false
|
||||
# Transfer the publicness of the app to ui and endpoints
|
||||
if ynh_permission_has_user --permission=main --user=visitors; then
|
||||
ynh_permission_update --permission="ui" --add="visitors"
|
||||
ynh_permission_update --permission="endpoints" --add="visitors"
|
||||
fi
|
||||
# Remove visitor access to the admin panel
|
||||
ynh_permission_update --permission="main" --remove="visitors"
|
||||
fi
|
||||
|
||||
# Flows were stored in file named after the hostname.
|
||||
|
|
Loading…
Reference in a new issue