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:
parent
c62e225934
commit
44d4f4a3ea
4 changed files with 9 additions and 7 deletions
|
@ -32,6 +32,11 @@
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"example": "/nodered",
|
"example": "/nodered",
|
||||||
"default": "/nodered"
|
"default": "/nodered"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "admin",
|
||||||
|
"type": "user",
|
||||||
|
"example": "johndoe"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
0
scripts/_common.sh
Normal file → Executable file
0
scripts/_common.sh
Normal file → Executable file
0
scripts/change_url
Normal file → Executable file
0
scripts/change_url
Normal file → Executable file
|
@ -22,7 +22,7 @@ ynh_abort_if_errors
|
||||||
|
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=0 #$YNH_APP_ARG_IS_PUBLIC
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -153,13 +153,10 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
ynh_script_progression --message="Configuring permissions..." --time --weight=1
|
||||||
|
|
||||||
# Make app public if necessary
|
ynh_permission_update --permission="main" --add="$admin"
|
||||||
if [ $is_public -eq 0 ]
|
ynh_permission_create --permission="ui" --url="/ui" --add="$admin"
|
||||||
then
|
|
||||||
ynh_permission_update --permission="main" --remove="visitors"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RELOAD NGINX
|
# RELOAD NGINX
|
||||||
|
|
Loading…
Add table
Reference in a new issue