1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/homeassistant_ynh.git synced 2024-09-03 19:26:16 +02:00
This commit is contained in:
ewilly 2021-01-15 21:48:11 +01:00 committed by GitHub
parent 1f111e0c66
commit d901ce73b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,7 +48,7 @@ log() {
# Check permission of ynh user. # Check permission of ynh user.
ynh_user_app_permission() { ynh_user_app_permission() {
access=$(cat "/etc/ssowat/conf.json" | jq ".users."$username"" | grep "Home Assistant") 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[])'
[ ! -z "$access" ] && return 1 [ ! -z "$access" ] && return 1
return 0 return 0
} }