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

Unified Diff: appengine/findit/common/base_handler.py

Issue 2416303002: [Findit] Adding support for triaging suspected builds from flake analysis (Closed)
Patch Set: Rebase 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 | « no previous file | appengine/findit/common/test/base_handler_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/common/base_handler.py
diff --git a/appengine/findit/common/base_handler.py b/appengine/findit/common/base_handler.py
index d4ef7e04b845479c98e074be47e14d0fda4375ff..ab374fdc3c7487515b5a4527e4f9cc02186abb6b 100644
--- a/appengine/findit/common/base_handler.py
+++ b/appengine/findit/common/base_handler.py
@@ -58,7 +58,13 @@ class BaseHandler(webapp2.RequestHandler):
"""Returns True if the user logged in with corp account or as admin."""
user_email = auth_util.GetUserEmail()
return ((user_email and user_email.endswith('@google.com')) or
- auth_util.IsCurrentUserAdmin())
+ auth_util.IsCurrentUserAdmin())
+
+ def _ShowDebugInfo(self):
+ # Show debug info only if the app is run locally during development, if the
+ # currently logged-in user is an admin, or if it is explicitly requested
+ # with parameter 'debug=1'.
+ return users.is_current_user_admin() or self.request.get('debug') == '1'
@staticmethod
def CreateError(error_message, return_code=500):
« no previous file with comments | « no previous file | appengine/findit/common/test/base_handler_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698