You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/02 20:41:25 UTC

[GitHub] [airflow] kaxil commented on a change in pull request #21938: RFC: Add per-DAG delete permissions

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 352 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org