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

Side by Side 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, 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import webapp2 5 import webapp2
6 import cgi 6 import cgi
7 7
8 from shared.utils import (guess_legacy_codereview_hostname, 8 from shared import utils
9 get_full_patchset_url) 9
10 10
11 class PatchStatus(webapp2.RequestHandler): # pragma: no cover 11 class PatchStatus(webapp2.RequestHandler): # pragma: no cover
12 @utils.read_access
12 def get(self, issue, patchset): # pylint: disable=W0221 13 def get(self, issue, patchset): # pylint: disable=W0221
13 codereview_hostname = guess_legacy_codereview_hostname(issue) 14 codereview_hostname = utils.guess_legacy_codereview_hostname(issue)
14 full_patchset_url = get_full_patchset_url(codereview_hostname, issue, 15 full_patchset_url = utils.get_full_patchset_url(codereview_hostname, issue,
15 patchset) 16 patchset)
16 self.response.write(open('templates/patch_status.html').read() % { 17 self.response.write(open('templates/patch_status.html').read() % {
17 'codereview_hostname': cgi.escape(codereview_hostname, quote=True), 18 'codereview_hostname': cgi.escape(codereview_hostname, quote=True),
18 'full_patchset_url': cgi.escape(full_patchset_url, quote=True), 19 'full_patchset_url': cgi.escape(full_patchset_url, quote=True),
19 'issue': cgi.escape(issue, quote=True), 20 'issue': cgi.escape(issue, quote=True),
20 'patchset': cgi.escape(patchset, quote=True), 21 'patchset': cgi.escape(patchset, quote=True),
21 }) 22 })
22 23
23 24
24 class PatchStatusV2(webapp2.RequestHandler): # pragma: no cover 25 class PatchStatusV2(webapp2.RequestHandler): # pragma: no cover
26 @utils.read_access
25 def get(self, codereview_hostname, issue, patchset): # pylint: disable=W0221 27 def get(self, codereview_hostname, issue, patchset): # pylint: disable=W0221
26 full_patchset_url = get_full_patchset_url(codereview_hostname, issue, 28 full_patchset_url = utils.get_full_patchset_url(codereview_hostname, issue,
27 patchset) 29 patchset)
28 self.response.write(open('templates/patch_status.html').read() % { 30 self.response.write(open('templates/patch_status.html').read() % {
29 'codereview_hostname': cgi.escape(codereview_hostname, quote=True), 31 'codereview_hostname': cgi.escape(codereview_hostname, quote=True),
30 'full_patchset_url': cgi.escape(full_patchset_url, quote=True), 32 'full_patchset_url': cgi.escape(full_patchset_url, quote=True),
31 'issue': cgi.escape(issue, quote=True), 33 'issue': cgi.escape(issue, quote=True),
32 'patchset': cgi.escape(patchset, quote=True), 34 'patchset': cgi.escape(patchset, quote=True),
33 }) 35 })
OLDNEW
« 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