Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: dashboard/dashboard/graph_csv.py

Issue 1549583002: In /graph_json, check internal_only on Test entity and skip test for all Row entities. (Closed) Base URL: https://github.com/catapult-project/catapult@master
Patch Set: Fixed assertions Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dashboard/dashboard/debug_alert_test.py ('k') | dashboard/dashboard/graph_csv_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/graph_csv.py
diff --git a/dashboard/dashboard/graph_csv.py b/dashboard/dashboard/graph_csv.py
index 005753c350a0c9312b26a4d40817da46ce987194..b25ecff1fcf5a216e335d1c41c12bb1aca446194 100644
--- a/dashboard/dashboard/graph_csv.py
+++ b/dashboard/dashboard/graph_csv.py
@@ -8,6 +8,7 @@ import csv
import logging
import StringIO
+from dashboard import datastore_hooks
from dashboard import request_handler
from dashboard import utils
from dashboard.models import graph_data
@@ -40,6 +41,10 @@ class GraphCsvHandler(request_handler.RequestHandler):
logging.info('Got request to /graph_csv for test: "%s".', test_path)
test_key = utils.TestKey(test_path)
+ test = test_key.get()
+ assert(datastore_hooks.IsUnalteredQueryPermitted() or
+ not test.internal_only)
+ datastore_hooks.SetSinglePrivilegedRequest()
q = graph_data.Row.query()
q = q.filter(graph_data.Row.parent_test == test_key)
if rev:
« no previous file with comments | « dashboard/dashboard/debug_alert_test.py ('k') | dashboard/dashboard/graph_csv_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698