o-nikolas commented on code in PR #57168:
URL: https://github.com/apache/airflow/pull/57168#discussion_r2466617040


##########
airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:
##########
@@ -268,6 +269,28 @@ def is_authorized_pool(
         :param details: optional details about the pool
         """
 
+    def is_authorized_team(
+        self,
+        *,
+        method: ResourceMethod,
+        user: T,
+        details: TeamDetails | None = None,
+    ) -> bool:
+        """
+        Return whether the user is authorized to perform a given action on a 
team.
+
+        It is used primarily to check whether a user belongs to a team.
+        This function need to be overridden by an auth manager compatible with 
multi-team.
+
+        :param method: the method to perform
+        :param user: the user to performing the action

Review Comment:
   ```suggestion
           :param user: the user performing the action
   ```



##########
airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:
##########
@@ -268,6 +269,28 @@ def is_authorized_pool(
         :param details: optional details about the pool
         """
 
+    def is_authorized_team(
+        self,
+        *,
+        method: ResourceMethod,
+        user: T,
+        details: TeamDetails | None = None,
+    ) -> bool:
+        """
+        Return whether the user is authorized to perform a given action on a 
team.
+
+        It is used primarily to check whether a user belongs to a team.
+        This function need to be overridden by an auth manager compatible with 
multi-team.
+
+        :param method: the method to perform
+        :param user: the user to performing the action
+        :param details: optional details about the pool

Review Comment:
   ```suggestion
           :param details: optional details about the team
   ```



##########
airflow-core/src/airflow/api_fastapi/auth/managers/base_auth_manager.py:
##########
@@ -268,6 +269,28 @@ def is_authorized_pool(
         :param details: optional details about the pool
         """
 
+    def is_authorized_team(
+        self,
+        *,
+        method: ResourceMethod,
+        user: T,
+        details: TeamDetails | None = None,
+    ) -> bool:
+        """
+        Return whether the user is authorized to perform a given action on a 
team.
+
+        It is used primarily to check whether a user belongs to a team.
+        This function need to be overridden by an auth manager compatible with 
multi-team.

Review Comment:
   ```suggestion
           This function needs to be overridden by an auth manager compatible 
with multi-team.
   ```



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