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

Unified Diff: appengine/chromium_cq_status/handlers/patch_status.py

Issue 2111713004: Teach CQ status app to check login status of users. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Review and tests. Created 4 years, 6 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/chromium_cq_status/handlers/patch_status.py
diff --git a/appengine/chromium_cq_status/handlers/patch_status.py b/appengine/chromium_cq_status/handlers/patch_status.py
index 166ea30e93f1800391668d55433222ff1503295e..cf35d20ac562c6f9e4ddae0ffd9aed3eb245e895 100644
--- a/appengine/chromium_cq_status/handlers/patch_status.py
+++ b/appengine/chromium_cq_status/handlers/patch_status.py
@@ -5,14 +5,15 @@
import webapp2
import cgi
-from shared.utils import (guess_legacy_codereview_hostname,
- get_full_patchset_url)
+from shared import utils
+
class PatchStatus(webapp2.RequestHandler): # pragma: no cover
+ @utils.read_access
def get(self, issue, patchset): # pylint: disable=W0221
- codereview_hostname = guess_legacy_codereview_hostname(issue)
- full_patchset_url = get_full_patchset_url(codereview_hostname, issue,
- patchset)
+ codereview_hostname = utils.guess_legacy_codereview_hostname(issue)
+ full_patchset_url = utils.get_full_patchset_url(codereview_hostname, issue,
+ patchset)
self.response.write(open('templates/patch_status.html').read() % {
'codereview_hostname': cgi.escape(codereview_hostname, quote=True),
'full_patchset_url': cgi.escape(full_patchset_url, quote=True),
@@ -22,9 +23,10 @@ class PatchStatus(webapp2.RequestHandler): # pragma: no cover
class PatchStatusV2(webapp2.RequestHandler): # pragma: no cover
+ @utils.read_access
def get(self, codereview_hostname, issue, patchset): # pylint: disable=W0221
- full_patchset_url = get_full_patchset_url(codereview_hostname, issue,
- patchset)
+ full_patchset_url = utils.get_full_patchset_url(codereview_hostname, issue,
+ patchset)
self.response.write(open('templates/patch_status.html').read() % {
'codereview_hostname': cgi.escape(codereview_hostname, quote=True),
'full_patchset_url': cgi.escape(full_patchset_url, quote=True),
« no previous file with comments | « appengine/chromium_cq_status/handlers/index.py ('k') | appengine/chromium_cq_status/handlers/patch_summary.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698