mirror of
https://github.com/YunoHost-Apps/nodered_ynh.git
synced 2024-09-03 19:46:25 +02:00
Fix backward compatibility tests in upgrade
This commit is contained in:
parent
d4f8f9afc4
commit
532bf8d0c4
1 changed files with 12 additions and 5 deletions
|
@ -65,15 +65,22 @@ if ynh_permission_exists --permission="admin"; then
|
|||
ynh_permission_delete --permission="admin"
|
||||
# We use main as admin permission
|
||||
ynh_permission_url --permission="main" --url="/admin"
|
||||
fi
|
||||
|
||||
if ! ynh_permission_exists --permission="ui"; then
|
||||
# Create ui permission, for the dashboard
|
||||
ynh_permission_create --permission="ui" --url="/ui" --show_tile=true
|
||||
fi
|
||||
|
||||
if ! ynh_permission_exists --permission="endpoints"; then
|
||||
# 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
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Add table
Reference in a new issue