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 2019/12/02 11:52:49 UTC

[GitHub] [airflow] robinedwards commented on a change in pull request #6684: [AIRFLOW-6095] Filter dags returned by task_stats

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:
users@infra.apache.org


With regards,
Apache Git Services