1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/homeassistant_ynh.git synced 2024-09-03 19:26:16 +02:00

Update to simpler

thanks to @tituspijean :)
This commit is contained in:
ewilly 2021-01-16 20:06:58 +00:00 committed by tituspijean
parent 62e15f8ae3
commit b6cf444f95

View file

@ -48,7 +48,7 @@ log() {
# Check permission of ynh user.
ynh_user_app_permission() {
access=$(cat "/etc/ssowat/conf.json" | jq 'def IN(s): . as $in | first(if (s == $in) then true else empty end) ; .permissions["homeassistant.main"].users as $f | '\"$username\"' | IN($f[])')
access=$(cat "/etc/ssowat/conf.json" | jq ".permissions.\"homeassistant.main\".users | index(\"$username\")")
[ ! -z "$access" ] && return 1
return 0
}