From d901ce73b1d0076c817e47e24528dd46c5cd3b8e Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 15 Jan 2021 21:48:11 +0100 Subject: [PATCH] Fix --- conf/homeassistant_conf_files/bin/ynh_ldap-auth.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/homeassistant_conf_files/bin/ynh_ldap-auth.sh b/conf/homeassistant_conf_files/bin/ynh_ldap-auth.sh index 4f091d0..0f447fe 100755 --- a/conf/homeassistant_conf_files/bin/ynh_ldap-auth.sh +++ b/conf/homeassistant_conf_files/bin/ynh_ldap-auth.sh @@ -48,7 +48,7 @@ log() { # Check permission of ynh user. 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 return 0 }