vincbeck commented on code in PR #34317:
URL: https://github.com/apache/airflow/pull/34317#discussion_r1338731975
##########
airflow/api_connexion/endpoints/dag_endpoint.py:
##########
@@ -180,7 +180,7 @@ def patch_dags(limit, session, offset=0, only_active=True,
tags=None, dag_id_pat
return dags_collection_schema.dump(DAGCollection(dags=dags,
total_entries=total_entries))
[email protected]_access([(permissions.ACTION_CAN_DELETE,
permissions.RESOURCE_DAG)])
[email protected]_access_dag("DELETE")
Review Comment:
1. The difference is just on the semantic. As of today, permissions are
represented by a couple of action and resources. You can find the list of
actions and resources
[here](https://github.com/apache/airflow/blob/main/airflow/security/permissions.py).
In AIP-56, we decided to get rid of these representations and come up with
more formal/generic to represent permissions. The current list of resources is
also too big and we want to make it simpler. I would recommend you reading this
[comment
thread](https://github.com/apache/airflow/pull/33213#discussion_r1304881823)
which might help you the different decisions we took along the process.
2. We decided to go with a `Literal` instead of an `enum` (see
[here](https://github.com/apache/airflow/pull/33213#discussion_r1318202392)).
So yes it is a string but constraints with some specific values only
--
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]