stegololz commented on code in PR #56433:
URL: https://github.com/apache/airflow/pull/56433#discussion_r2428967250
##########
providers/keycloak/src/airflow/providers/keycloak/auth_manager/keycloak_auth_manager.py:
##########
@@ -149,12 +149,70 @@ def is_authorized_dag(
) -> bool:
dag_id = details.id if details else None
access_entity_str = access_entity.value if access_entity else None
+ team_name = details.team_name if details else None
+ attributes: dict[str, str | None] = {"dag_entity": access_entity_str}
+ if team_name:
+ attributes["team_name"] = team_name
return self._is_authorized(
method=method,
resource_type=KeycloakResource.DAG,
user=user,
resource_id=dag_id,
- attributes={"dag_entity": access_entity_str},
+ attributes=attributes,
+ )
+
+ def is_batch_authorized_dag(
Review Comment:
I've refactored to have most of my changes related to caching in a class, to
keep the KeycloakAuthManager as simple as possible
--
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]