From fe3ecb3ed2de85da3e88f0015135d9597f703e43 Mon Sep 17 00:00:00 2001 From: Matyas Selmeci Date: Wed, 8 Nov 2023 17:17:16 -0600 Subject: [PATCH] Don't stop parsing the auth list at the first PUBLIC auth method --- src/webapp/data_federation.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/webapp/data_federation.py b/src/webapp/data_federation.py index 06a700fe3..204c05540 100644 --- a/src/webapp/data_federation.py +++ b/src/webapp/data_federation.py @@ -196,7 +196,7 @@ def __init__( self.credential_generation = credential_generation def is_public(self) -> bool: - return self.authz_list and self.authz_list[0].is_public + return any(x for x in self.authz_list if x.is_public) def _parse_authz_scitokens(attributes: Dict, authz: Dict) -> Tuple[AuthMethod, Optional[str]]: @@ -392,8 +392,5 @@ def parse_authz_list(self, path: str, unparsed_authz_list: List[Union[str, Dict] if err: self.errors.add(f"Namespace {path}: {err}") continue - if parsed_authz.is_public: - return [parsed_authz] - else: - authz_list.append(parsed_authz) + authz_list.append(parsed_authz) return authz_list