1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nodered_ynh.git synced 2024-09-03 19:46:25 +02:00

Properly use the permissions system

add permission to dashboard to /ui
and fix scripts filemodes
This commit is contained in:
tituspijean 2021-04-29 21:36:07 +02:00
parent c62e225934
commit 44d4f4a3ea
4 changed files with 9 additions and 7 deletions

View file

@ -32,6 +32,11 @@
"type": "path",
"example": "/nodered",
"default": "/nodered"
},
{
"name": "admin",
"type": "user",
"example": "johndoe"
}
]
}

0
scripts/_common.sh Normal file → Executable file
View file

0
scripts/change_url Normal file → Executable file
View file

View file

@ -22,7 +22,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=0 #$YNH_APP_ARG_IS_PUBLIC
admin=$YNH_APP_ARG_ADMIN
app=$YNH_APP_INSTANCE_NAME
#=================================================
@ -153,13 +153,10 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring permissions..." --weight=1
ynh_script_progression --message="Configuring permissions..." --time --weight=1
# Make app public if necessary
if [ $is_public -eq 0 ]
then
ynh_permission_update --permission="main" --remove="visitors"
fi
ynh_permission_update --permission="main" --add="$admin"
ynh_permission_create --permission="ui" --url="/ui" --add="$admin"
#=================================================
# RELOAD NGINX