pierrejeambrun commented on code in PR #47194:
URL: https://github.com/apache/airflow/pull/47194#discussion_r1977333005
##########
airflow/api_fastapi/core_api/security.py:
##########
@@ -82,6 +82,23 @@ def callback():
return inner
+def requires_access_connection(method: ResourceMethod) -> Callable:
+ def inner(
+ connection_id: str | None = None,
+ user: Annotated[BaseUser | None, Depends(get_user)] = None,
+ ) -> None:
+ def callback():
+ return get_auth_manager().is_authorized_dag(
+ method=method,
details=ConnectionDetails(conn_id=connection_id), user=user
+ )
+
+ _requires_access(
+ is_authorized_callback=callback,
Review Comment:
We can keep like this for now.
##########
airflow/api_fastapi/core_api/openapi/v1-generated.yaml:
##########
Review Comment:
The spec should not be updated beside the `security` sections.
Maybe an idea is
https://github.com/apache/airflow/pull/47192#discussion_r1977324152
--
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]