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

Side by Side Diff: appengine/findit/handlers/config.py

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: reordering imports Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Handles requests to the findit config page.""" 5 """Handles requests to the findit config page."""
6 6
7 import json 7 import json
8 8
9 from common.base_handler import BaseHandler 9 from common.base_handler import BaseHandler, Permission
10 from common.base_handler import Permission
11 from model import wf_config 10 from model import wf_config
12 from waterfall import waterfall_config 11 from waterfall import waterfall_config
13 12
14 from google.appengine.api import users 13 from google.appengine.api import users
15 14
16 15
17 def _RemoveDuplicatesAndSort(elements): 16 def _RemoveDuplicatesAndSort(elements):
18 return list(set(elements)) 17 return list(set(elements))
19 18
20 19
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 new_config_dict = json.loads(data) 280 new_config_dict = json.loads(data)
282 if not _ConfigurationDictIsValid(new_config_dict): # pragma: no cover 281 if not _ConfigurationDictIsValid(new_config_dict): # pragma: no cover
283 return self.CreateError( 282 return self.CreateError(
284 'New configuration settings is not properly formatted.', 400) 283 'New configuration settings is not properly formatted.', 400)
285 284
286 wf_config.FinditConfig.Get().Update(users.get_current_user(), 285 wf_config.FinditConfig.Get().Update(users.get_current_user(),
287 users.IsCurrentUserAdmin(), 286 users.IsCurrentUserAdmin(),
288 **new_config_dict) 287 **new_config_dict)
289 288
290 return self.HandleGet() 289 return self.HandleGet()
OLDNEW
« no previous file with comments | « appengine/findit/handlers/check_duplicate_failures.py ('k') | appengine/findit/handlers/crash/crash_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698