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

Unified Diff: appengine/findit/handlers/config.py

Issue 1836293002: [Findit] Adding central config test class for unit tests (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Addressing comments Created 4 years, 8 months 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: appengine/findit/handlers/config.py
diff --git a/appengine/findit/handlers/config.py b/appengine/findit/handlers/config.py
index 74883848bcde94072804cf7e2e4331020df83f12..e65f52e94f06cb78cc997e5ce66c84a34f4675fa 100644
--- a/appengine/findit/handlers/config.py
+++ b/appengine/findit/handlers/config.py
@@ -11,6 +11,8 @@ from base_handler import Permission
from model import wf_config
from waterfall import waterfall_config
+from google.appengine.api import users
+
def _RemoveDuplicatesAndSort(elements):
return list(set(elements))
@@ -243,6 +245,8 @@ class Configuration(BaseHandler):
return self.CreateError(
'New configuration settings is not properly formatted.', 400)
- wf_config.FinditConfig.Get().Update(**new_config_dict)
+ wf_config.FinditConfig.Get().Update(users.get_current_user(),
+ users.IsCurrentUserAdmin(),
stgao 2016/04/04 22:07:23 nit: Inconsistent with API. is_admin is a key-valu
lijeffrey 2016/04/04 23:56:41 Done.
+ **new_config_dict)
return self.HandleGet()
« no previous file with comments | « no previous file | appengine/findit/handlers/test/build_failure_test.py » ('j') | appengine/findit/waterfall/test/wf_testcase.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698