use-git yunohost-admin: automagically add custom perm for /sockjs-node / vuejs hotreload

This commit is contained in:
Alexandre Aubin 2021-10-20 13:21:19 +02:00
parent ee4d6b3cac
commit a385942d8a

22
ynh-dev
View file

@ -349,6 +349,28 @@ location /sockjs-node {
}
EOF
# If ssowat's conf persistent ~empty, allow ourselves to add the rule for /sockjs-node for hot-reload
if [ ! -e /etc/ssowat/conf.json.persistent ] || [ -z "$(cat /etc/ssowat/conf.json.persistent | tr -d '{} \n')" ]
then
cat <<EOF >/etc/ssowat/conf.json.persistent
{
"permissions": {
"webadminhotreload": {
"auth_header": false,
"label": "Core permissions - skipped",
"public": true,
"show_tile": false,
"uris": [
"re:^[^/]*/sockjs-node",
],
"users": []
}
}
}
EOF
fi
systemctl reload nginx
cd /ynh-dev/yunohost-admin/app/
npm run serve