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

Unified Diff: appengine/findit/waterfall/flake/flake_analysis_service.py

Issue 2435983003: [Findit] Asynchronously process flake reports from chromium-try-flakes. (Closed)
Patch Set: Rebase to resolve conflict Created 4 years, 2 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
« no previous file with comments | « appengine/findit/waterfall-backend.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/waterfall/flake/flake_analysis_service.py
diff --git a/appengine/findit/waterfall/flake/flake_analysis_service.py b/appengine/findit/waterfall/flake/flake_analysis_service.py
index dee4cb85a4f33c0bb470d8c43833fae125d8d1e3..cf6d4214db934fb0f2ef86f7cb79dfac48775d66 100644
--- a/appengine/findit/waterfall/flake/flake_analysis_service.py
+++ b/appengine/findit/waterfall/flake/flake_analysis_service.py
@@ -169,11 +169,11 @@ def _CheckForNewAnalysis(request):
return _MergeNewRequestIntoExistingOne(request, previous_request)
-def _IsAuthorizedUser(user_email):
- """Returns True if the given user email account is authorized for access."""
- return user_email and (
+def IsAuthorizedUser(user_email, is_admin):
+ """Returns True if the given user email account is authorized for access."""
+ return is_admin or (user_email and (
user_email in constants.WHITELISTED_APP_ACCOUNTS or
- user_email.endswith('@google.com'))
+ user_email.endswith('@google.com')))
def ScheduleAnalysisForFlake(request, user_email, is_admin, triggering_source):
@@ -192,7 +192,7 @@ def ScheduleAnalysisForFlake(request, user_email, is_admin, triggering_source):
"""
assert len(request.build_steps), 'At least 1 build step is needed!'
- if not is_admin and not _IsAuthorizedUser(user_email):
+ if not IsAuthorizedUser(user_email, is_admin):
return None
request.user_emails = [user_email]
« no previous file with comments | « appengine/findit/waterfall-backend.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698