ashb commented on a change in pull request #11362:
URL: https://github.com/apache/airflow/pull/11362#discussion_r511853354



##########
File path: airflow/www/views.py
##########
@@ -1773,8 +1856,11 @@ def recurse_nodes(task, visited):
             external_log_name=external_log_name)
 
     @expose('/graph')
-    @has_dag_access(can_dag_read=True)
-    @has_access
+    @auth.has_access([
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG),
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_TASK_INSTANCE),
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_TASK_LOG),

Review comment:
       We should create a follow up PR to not make read task logs a requirement 
-- and if the permission is missing just don't do the `if 
task_log_reader.supports_external_link` bit.

##########
File path: airflow/www/views.py
##########
@@ -1607,11 +1687,14 @@ def success(self):
                                               future, past, State.SUCCESS)
 
     @expose('/tree')
-    @has_dag_access(can_dag_read=True)
-    @has_access
-    @gzipped
-    @action_logging
-    def tree(self):  # pylint: disable=too-many-locals
+    @auth.has_access([
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG),
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_TASK_INSTANCE),
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_TASK_LOG),

Review comment:
       We should create a follow up PR to not make read task logs a requirement 
-- and if the permission is missing just don't do the `if 
task_log_reader.supports_external_link` bit.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to