vincbeck commented on code in PR #61351:
URL: https://github.com/apache/airflow/pull/61351#discussion_r2813204643
##########
providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:
##########
@@ -425,6 +459,10 @@ def _get_token_url(server_url, realm):
# Normalize server_url to avoid double slashes (required for Keycloak
26.4+ strict path validation).
return
f"{server_url.rstrip('/')}/realms/{realm}/protocol/openid-connect/token"
+ @staticmethod
+ def _get_team_name(details: Any | None) -> str | None:
Review Comment:
Nit: instead of using `Any` maybe you can list the types like
`ConnectionsDetails | VariableDetails | ...`
##########
providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:
##########
@@ -368,9 +396,15 @@ def _is_authorized(
elif method == "GET":
method = "LIST"
+ if conf.getboolean("core", "multi_team", fallback=False) and
resource_type in TEAM_SCOPED_RESOURCES:
+ resource_name = f"{resource_type.value}:{team_name}" if team_name
else resource_type.value
Review Comment:
```suggestion
if team_name and conf.getboolean("core", "multi_team",
fallback=False) and resource_type in TEAM_SCOPED_RESOURCES:
resource_name = f"{resource_type.value}:{team_name}"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]