policies/expression: fix ak_user_has_authenticator evaluation when not specifying optional device_type (#1849)

* Fix ak_user_has_authenticator evaluation when not specifying optional device_type

* Simpler patch
This commit is contained in:
Matthew R. McDougal 2021-11-29 03:35:17 -06:00 committed by GitHub
parent c31df2b3f9
commit e597bb4542
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class PolicyEvaluator(BaseEvaluator):
if device_class == device_type: if device_class == device_type:
return True return True
return False return False
return len(user_devices) > 0 return len(list(user_devices)) > 0
def set_policy_request(self, request: PolicyRequest): def set_policy_request(self, request: PolicyRequest):
"""Update context based on policy request (if http request is given, update that too)""" """Update context based on policy request (if http request is given, update that too)"""