aaron-y-chen commented on code in PR #76493:
URL: https://github.com/apache/airflow/pull/76493#discussion_r4689230460
##########
airflow-core/src/airflow/api_fastapi/core_api/security.py:
##########
@@ -573,13 +580,13 @@ def _authorize_backfill_in_path(method: ResourceMethod,
dag_id: str | None, user
def requires_access_backfill(
method: ResourceMethod,
-) -> Callable[[Request, BaseUser, Session], Coroutine[Any, Any, None]]:
- """Wrap ``requires_access_dag`` and extract the dag_id from the
backfill_id."""
+) -> Callable[[Request, BaseUser, AsyncSession], Coroutine[Any, Any, None]]:
+ """Authorize against the backfill's Dag, or the Dag the request names when
there is no backfill_id."""
async def inner(
request: Request,
user: GetUserDep,
- session: SessionDep,
+ session: AsyncSessionDep,
Review Comment:
Good suggestion, let me fix it.
--
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]