potiuk commented on code in PR #59399:
URL: https://github.com/apache/airflow/pull/59399#discussion_r2616941165
##########
airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:
##########
@@ -347,6 +348,15 @@ def filter_authorized_menu_items(self, menu_items:
list[MenuItem], *, user: T) -
:param user: the user
"""
+ @abstractmethod
+ def is_allowed(self, user_id: str, assigned_users: Sequence[HITLUser]) ->
bool:
+ """
+ Check if a user is allowed to approve/reject a HITL task.
+
+ :param user_id: the user id to check
+ :param assigned_users: list of users assigned to the task
+ """
Review Comment:
yeah. I think we need to also wait for @vincbeck to make some decisions on
the best API to use. I honestly do not think that leaking "HITLUser" to Auth
Manager is good choice. Auth Manager should maybe understand HITL as the
concept, but imho it should get only the user_ids not on HitlUser objects.
--
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]