This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new c0f71799986 Update docstring for users param in auth managers (#47334)
c0f71799986 is described below

commit c0f71799986f8fe007c340b7aa447169a1ca0ad8
Author: Jed Cunningham <[email protected]>
AuthorDate: Tue Mar 4 01:48:33 2025 -0700

    Update docstring for users param in auth managers (#47334)
    
    This is the user performing the action, the action isn't being performed
    on the user.
---
 airflow/auth/managers/base_auth_manager.py         | 24 +++++++++++-----------
 .../providers/fab/auth_manager/fab_auth_manager.py |  8 ++++----
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/airflow/auth/managers/base_auth_manager.py 
b/airflow/auth/managers/base_auth_manager.py
index 8c8153c5f5c..8021a82ca9f 100644
--- a/airflow/auth/managers/base_auth_manager.py
+++ b/airflow/auth/managers/base_auth_manager.py
@@ -164,7 +164,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         Return whether the user is authorized to perform a given action on 
configuration.
 
         :param method: the method to perform
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         :param details: optional details about the configuration
         """
 
@@ -180,7 +180,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         Return whether the user is authorized to perform a given action on a 
connection.
 
         :param method: the method to perform
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         :param details: optional details about the connection
         """
 
@@ -197,7 +197,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         Return whether the user is authorized to perform a given action on a 
DAG.
 
         :param method: the method to perform
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         :param access_entity: the kind of DAG information the authorization 
request is about.
             If not provided, the authorization request is about the DAG itself
         :param details: optional details about the DAG
@@ -215,7 +215,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         Return whether the user is authorized to perform a given action on an 
asset.
 
         :param method: the method to perform
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         :param details: optional details about the asset
         """
 
@@ -231,7 +231,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         Return whether the user is authorized to perform a given action on a 
pool.
 
         :param method: the method to perform
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         :param details: optional details about the pool
         """
 
@@ -247,7 +247,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         Return whether the user is authorized to perform a given action on a 
variable.
 
         :param method: the method to perform
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         :param details: optional details about the variable
         """
 
@@ -262,7 +262,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         Return whether the user is authorized to access a read-only state of 
the installation.
 
         :param access_view: the specific read-only view/state the 
authorization request is about.
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         """
 
     @abstractmethod
@@ -279,7 +279,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
             In that case, the action can be anything (e.g. can_do).
             See https://github.com/apache/airflow/issues/39144
         :param resource_name: the name of the resource
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         """
 
     @abstractmethod
@@ -304,7 +304,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         manager implementation to provide a more efficient implementation.
 
         :param requests: a list of requests containing the parameters for 
``is_authorized_connection``
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         """
         return all(
             self.is_authorized_connection(method=request["method"], 
details=request.get("details"), user=user)
@@ -325,7 +325,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         implementation to provide a more efficient implementation.
 
         :param requests: a list of requests containing the parameters for 
``is_authorized_dag``
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         """
         return all(
             self.is_authorized_dag(
@@ -351,7 +351,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         manager implementation to provide a more efficient implementation.
 
         :param requests: a list of requests containing the parameters for 
``is_authorized_pool``
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         """
         return all(
             self.is_authorized_pool(method=request["method"], 
details=request.get("details"), user=user)
@@ -372,7 +372,7 @@ class BaseAuthManager(Generic[T], LoggingMixin):
         manager implementation to provide a more efficient implementation.
 
         :param requests: a list of requests containing the parameters for 
``is_authorized_variable``
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
         """
         return all(
             self.is_authorized_variable(method=request["method"], 
details=request.get("details"), user=user)
diff --git 
a/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py 
b/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py
index c1fb557e178..660ea82e5a8 100644
--- a/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py
+++ b/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py
@@ -306,7 +306,7 @@ class FabAuthManager(BaseAuthManager[User]):
                 if no specific DAG is targeted, just check the sub entity.
 
         :param method: The method to authorize.
-        :param user: The user.
+        :param user: The user performing the action.
         :param access_entity: The dag access entity.
         :param details: The dag details.
         """
@@ -493,7 +493,7 @@ class FabAuthManager(BaseAuthManager[User]):
 
         :param method: the method to perform
         :param resource_type: the type of resource the user attempts to 
perform the action on
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
 
         :meta private:
         """
@@ -513,7 +513,7 @@ class FabAuthManager(BaseAuthManager[User]):
 
         :param method: the method to perform
         :param details: details about the DAG
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
 
         :meta private:
         """
@@ -539,7 +539,7 @@ class FabAuthManager(BaseAuthManager[User]):
 
         :param method: the method to perform
         :param details: details about the DAG
-        :param user: the user to perform the action on
+        :param user: the user to performing the action
 
         :meta private:
         """

Reply via email to