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

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: Removed purposeful fail for local debugging 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
Index: dashboard/dashboard/graph_csv.py
diff --git a/dashboard/dashboard/graph_csv.py b/dashboard/dashboard/graph_csv.py
index 005753c350a0c9312b26a4d40817da46ce987194..2c280a4baf69cb9bb01ef29f52ffff2be3b14039 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,9 @@ 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(utils.IsInternalUser or not test.internal_only)
qyearsley 2015/12/28 22:50:56 utils.IsInternalUser -> utils.IsInternalUser() Po
sullivan 2015/12/29 03:36:07 Done.
+ datastore_hooks.SetSinglePrivilegedRequest()
q = graph_data.Row.query()
q = q.filter(graph_data.Row.parent_test == test_key)
if rev:

Powered by Google App Engine
This is Rietveld 408576698