kaxil commented on a change in pull request #21938:
URL: https://github.com/apache/airflow/pull/21938#discussion_r818084353



##########
File path: airflow/www/security.py
##########
@@ -325,6 +325,11 @@ def can_edit_dag(self, dag_id, user=None) -> bool:
         dag_resource_name = permissions.resource_name_for_dag(dag_id)
         return self.has_access(permissions.ACTION_CAN_EDIT, dag_resource_name, 
user=user)
 
+    def can_delete_dag(self, dag_id, user=None) -> bool:
+        """Determines whether a user has DAG delete access."""
+        dag_resource_name = permissions.resource_name_for_dag(dag_id)
+        return self.has_access(permissions.ACTION_CAN_DELETE, 
dag_resource_name, user=user)

Review comment:
       Comment on L352 might need changing i.e might need adding `can_delete`




-- 
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