shakhar opened a new issue, #37249:
URL: https://github.com/apache/airflow/issues/37249

   ### Apache Airflow Provider(s)
   
   fab
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-amazon==8.7.1
   apache-airflow-providers-celery==3.3.4
   apache-airflow-providers-cncf-kubernetes==7.7.0
   apache-airflow-providers-common-sql==1.7.2
   apache-airflow-providers-ftp==3.5.2
   apache-airflow-providers-google==10.9.0
   apache-airflow-providers-http==4.5.2
   apache-airflow-providers-imap==3.3.2
   apache-airflow-providers-jenkins==3.3.2
   apache-airflow-providers-postgres==5.6.1
   apache-airflow-providers-sqlite==3.4.3
   
   ### Apache Airflow version
   
   2.7.2
   
   ### Operating System
   
   Amazon Linux 2023
   
   ### Deployment
   
   Amazon (AWS) MWAA
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   I am trying to add DAG level params by adding `'access_control': { 
'my_user': {'can_read', 'can_create', 'can_edit', 'can_delete'} }` to my DAG 
fields and I am getting the following error:
   
![image](https://github.com/apache/airflow/assets/7086888/60460c37-b7db-4396-8519-bc2e8ab8f360)
   I saw in the docs that 'can_create' is supported 
([ref](https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html#access-control:~:text=%22Viewer%22%3A%20%7B%22can_edit%22%2C%20%22can_create%22%2C%20%22can_delete%22%7D%2C))
 but I see in the code it doesn't support it 
([ref1](https://github.com/apache/airflow/blob/53185aba1a1a0475c4cb537560e0ca5d3983644f/airflow/security/permissions.py#L67),
 
[ref2](https://github.com/apache/airflow/blob/53185aba1a1a0475c4cb537560e0ca5d3983644f/airflow/providers/fab/auth_manager/security_manager/override.py#L1088-L1094)).
   
   ### What you think should happen instead
   
   It should support adding 'can_create' permission to DAG level permissions, 
in order to allow us to configure who can trigger a specific DAG.
   
   ### How to reproduce
   
   Adding `'access_control': { 'User': {'can_create'} }` to the DAG fields.
   
   ### 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]

Reply via email to