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



##########
File path: airflow/www/views.py
##########
@@ -1847,10 +1964,14 @@ class GraphForm(DateTimeWithNumRunsWithDagRunsForm):
             dag_run_state=dt_nr_dr_data['dr_state'])
 
     @expose('/duration')
-    @has_dag_access(can_dag_read=True)
-    @has_access
+    @auth.has_access([
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_DAGS),
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_TASK_INSTANCE),
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_TASK),
+        (permissions.ACTION_CAN_READ, permissions.RESOURCE_WEBSITE),
+    ])
     @action_logging
-    @provide_session
+    @provide_session  # pylint: disable=too-many-locals

Review comment:
       Surprisingly, no. Pylint gets mad if this isn't applied to the 
decorator, rather than the function itself. Not entirely sure why.




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