robinedwards commented on a change in pull request #6684: [AIRFLOW-6095] Filter 
dags returned by task_stats
URL: https://github.com/apache/airflow/pull/6684#discussion_r352555482
 
 

 ##########
 File path: airflow/www/views.py
 ##########
 @@ -334,11 +334,20 @@ def task_stats(self, session=None):
         DagRun = models.DagRun
         Dag = models.DagModel
 
-        filter_dag_ids = appbuilder.sm.get_accessible_dag_ids()
+        allowed_dag_ids = set(appbuilder.sm.get_accessible_dag_ids())
 
-        payload = {}
-        if not filter_dag_ids:
-            return
+        if not allowed_dag_ids:
+            return Response('Forbidden', 403)
 
 Review comment:
   Good point. The original statement actually generated a 500 but i will 
switch it to an empty payload

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


With regards,
Apache Git Services

Reply via email to