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

View file

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