Lee-W commented on code in PR #54308:
URL: https://github.com/apache/airflow/pull/54308#discussion_r2275595379
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/hitl.py:
##########
@@ -119,6 +119,18 @@ def _update_hitl_detail(
"and is not allowed to write again.",
)
+ user_id = user.get_id()
+
+ if hitl_detail_model.respondents:
+ if isinstance(user_id, int):
+ # FabAuthManager (ab_user) store user id as integer, but common
interface is string type
+ user_id = str(user_id)
+ if user_id not in hitl_detail_model.respondents:
+ log.error("User=%s[%s] is not a respondent for the task", user_id,
type(user_id))
+ raise HTTPException(
+ status.HTTP_403_FORBIDDEN, f"User={user_id} is not a
respondent for the task."
+ )
+
hitl_detail_model.user_id = user.get_id()
Review Comment:
sounds good!
--
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]