Only authenticate request when owner can be found

This commit is contained in:
Jason Hu 2019-01-11 00:26:25 -08:00 committed by GitHub
parent c3e9bd1444
commit 97394df0b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,8 +92,8 @@ def setup_auth(app, trusted_networks, api_password):
for user in users:
if user.is_owner:
request['hass_user'] = user
authenticated = True
break
authenticated = True
request[KEY_AUTHENTICATED] = authenticated
return await handler(request)