-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Closed
Labels
Milestone
Description
What do you see as an issue?
The three actions allowed in DAG-level permissions are as follows:
airflow/airflow/security/permissions.py
Line 67 in bf90992
| DAG_ACTIONS = {ACTION_CAN_READ, ACTION_CAN_EDIT, ACTION_CAN_DELETE} |
However, the sample code in this document includes can_create.
DAG(
dag_id="example_fine_grained_access",
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
access_control={
"Viewer": {"can_edit", "can_create", "can_delete"},
},
)If you use the above code, the following error occurs:
Solving the problem
Change the document sample code as follows:
DAG(
dag_id="example_fine_grained_access",
start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
access_control={
- "Viewer": {"can_edit", "can_create", "can_delete"},
+ "Viewer": {"can_edit", "can_read", "can_delete"},
},
)Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable