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 2021/09/20 06:26:57 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #16634: Require can_edit on DAG privileges to modify TaskInstances and DagRuns

uranusjr commented on a change in pull request #16634:
URL: https://github.com/apache/airflow/pull/16634#discussion_r711902425



##########
File path: airflow/www/views.py
##########
@@ -3194,16 +3194,22 @@ def action_has_dag_edit_access(action_func: Callable) -> Callable:
     @wraps(action_func)
     def check_dag_edit_acl_for_actions(
         self,
-        items: Optional[Union[List[TaskInstance], List[DagRun], TaskInstance, DagRun, None]],
+        items: Optional[Union[Iterable[TaskInstance], Iterable[DagRun], TaskInstance, DagRun]],

Review comment:
       The implementation currently can only take `list` (aside from one single TaskInstance and DagRun), if you change this, you need to rewrite the implementation as well.

##########
File path: airflow/www/views.py
##########
@@ -3194,16 +3194,22 @@ def action_has_dag_edit_access(action_func: Callable) -> Callable:
     @wraps(action_func)
     def check_dag_edit_acl_for_actions(
         self,
-        items: Optional[Union[List[TaskInstance], List[DagRun], TaskInstance, DagRun, None]],
+        items: Optional[Union[Iterable[TaskInstance], Iterable[DagRun], TaskInstance, DagRun]],
         *args,
         **kwargs,
-    ) -> None:
+    ):

Review comment:
       Why removing this?




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