Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions airflow/auth/managers/base_auth_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def is_authorized_configuration(
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
"""

Expand All @@ -176,7 +176,7 @@ def is_authorized_connection(
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
"""

Expand All @@ -193,7 +193,7 @@ def is_authorized_dag(
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
Expand All @@ -211,7 +211,7 @@ def is_authorized_asset(
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
"""

Expand All @@ -227,7 +227,7 @@ def is_authorized_pool(
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
"""

Expand All @@ -243,7 +243,7 @@ def is_authorized_variable(
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
"""

Expand All @@ -258,7 +258,7 @@ def is_authorized_view(
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
Expand All @@ -275,7 +275,7 @@ def is_authorized_custom_view(self, *, method: ResourceMethod | str, resource_na
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
Expand All @@ -300,7 +300,7 @@ def batch_is_authorized_connection(
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)
Expand All @@ -321,7 +321,7 @@ def batch_is_authorized_dag(
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(
Expand All @@ -347,7 +347,7 @@ def batch_is_authorized_pool(
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)
Expand All @@ -368,7 +368,7 @@ def batch_is_authorized_variable(
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def is_authorized_dag(
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.
"""
Expand Down Expand Up @@ -486,7 +486,7 @@ def _is_authorized(

: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:
"""
Expand All @@ -506,7 +506,7 @@ def _is_authorized_dag(

: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:
"""
Expand All @@ -532,7 +532,7 @@ def _is_authorized_dag_run(

: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:
"""
Expand Down