potiuk commented on code in PR #59399:
URL: https://github.com/apache/airflow/pull/59399#discussion_r2616942322


##########
providers/amazon/src/airflow/providers/amazon/aws/auth_manager/aws_auth_manager.py:
##########
@@ -247,6 +248,14 @@ def _has_access_to_menu_item(request: IsAuthorizedRequest):
 
         return [menu_item for menu_item in menu_items if 
_has_access_to_menu_item(requests[menu_item.value])]
 
+    def is_allowed(self, user_id: str, assigned_users: Sequence[HITLUser]) -> 
bool:
+        """
+        Check if a user is allowed to approve/reject a HITL task.
+
+        User must be in assigned_users list.
+        """
+        return any(user["id"] == user_id for user in assigned_users)

Review Comment:
   Yeah. That would be my choice too.



-- 
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]

Reply via email to