jedcunningham commented on a change in pull request #18438:
URL: https://github.com/apache/airflow/pull/18438#discussion_r718938773



##########
File path: tests/www/views/test_views_tasks.py
##########
@@ -754,3 +754,69 @@ def 
test_set_task_instance_action_permission_denied(session, client_ti_without_d
         follow_redirects=True,
     )
     check_content_in_response(expected_message, resp)
+
+
[email protected](
+    "task_search_tuples",
+    [
+        (
+            [
+                ("example_xcom", "bash_push"),
+                ("example_bash_operator", "run_this_last"),
+            ]
+        ),
+        (
+            [
+                ("example_subdag_operator", "some-other-task"),
+            ]
+        ),

Review comment:
       ```suggestion
           [("example_xcom", "bash_push"), ("example_bash_operator", 
"run_this_last")],
           [("example_subdag_operator", "some-other-task")]
   ```
   
   nit, one less layer of nesting and easier to read.

##########
File path: airflow/www/views.py
##########
@@ -4203,7 +4203,8 @@ class 
TaskInstanceModelView(AirflowPrivilegeVerifierModelView):
     class_permission_name = permissions.RESOURCE_TASK_INSTANCE
     method_permission_name = {
         'list': 'read',
-        'action_clear': 'edit',
+        'action_clear': 'delete',

Review comment:
       This seems like this should be edit, like the `set_*`'s. I know you 
mirrored DagRunModelView, but I'm wondering if this is right and 
DagRunModelView is wrong 🤷‍♂️.




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