oshyun opened a new issue, #36349: URL: https://github.com/apache/airflow/issues/36349
### What do you see as an issue? The three actions allowed in DAG-level permissions are as follows: https://github.com/apache/airflow/blob/bf90992dd48bce7de9f2a687860479e95575cd24/airflow/security/permissions.py#L67 However, the sample code in [this document](https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html#order-of-precedence-for-dag-level-permissions) includes `can_create`. ```py 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:<img width="802" alt="image" src="https://github.com/apache/airflow/assets/36976583/e0387958-3d41-4d9a-a68d-2caed0fd3c89"> ### Solving the problem Change the document sample code as follows: ```diff 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? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- 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]
