Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use batch_is_authorized_dag to check if user has permission to read DAGs #36279

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

vincbeck
Copy link
Contributor

In get_dag_source, it first fetch all accessible DAG ids for the current user and then check if the DAGs belong to these. It makes more sense to use the API made to figure out if a user has permission to access multiple DAGs: batch_is_authorized_dag.

See #36257.

cc @hussein-awala


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@boring-cyborg boring-cyborg bot added the area:API Airflow's REST/HTTP API label Dec 18, 2023
@@ -418,7 +418,7 @@
"asgiref>=3.5.2",
"gcloud-aio-auth>=4.0.0,<5.0.0",
"gcloud-aio-bigquery>=6.1.2",
"gcloud-aio-storage",
"gcloud-aio-storage>=9.0.0",
Copy link
Contributor Author

@vincbeck vincbeck Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea why this file has been modified

Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactoring! I didn't see the new implemented method before.

@hussein-awala hussein-awala added the type:misc/internal Changelog: Misc changes that should appear in change log label Dec 18, 2023
@hussein-awala hussein-awala added this to the Airflow 2.8.1 milestone Dec 18, 2023
@vincbeck vincbeck merged commit a7ab64e into apache:main Dec 18, 2023
51 checks passed
@vincbeck vincbeck deleted the vincbeck/dag_read_batch branch December 18, 2023 19:49
ephraimbuddy pushed a commit that referenced this pull request Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants