example_config: fix HA for blank displayName

This commit is contained in:
Santi Gonzalez
2026-02-18 17:56:44 +01:00
committed by nitnelave
parent 6f94134fdc
commit aa1384939b
+2 -2
View File
@@ -64,7 +64,7 @@ if [[ ! -z "$2" ]] && ! jq -e '.groups|map(.displayName)|index("'"$2"'")' <<< $U
exit 1
fi
DISPLAY_NAME=$(jq -r .displayName <<< $USER_JSON)
DISPLAY_NAME=$(jq -r '.displayName // .id' <<< $USER_JSON)
IS_ADMIN=false
if [[ ! -z "$3" ]] && jq -e '.groups|map(.displayName)|index("'"$3"'")' <<< "$USER_JSON" > /dev/null 2>&1; then
@@ -88,4 +88,4 @@ if [[ "$IS_LOCAL" = true ]]; then
echo "local_only = true"
else
echo "local_only = false"
fi
fi