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

Side by Side Diff: appengine/chromium_cq_status/handlers/index.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 from google.appengine.api import users 5 from google.appengine.api import users
6 import webapp2 6 import webapp2
7 7
8 from shared import utils 8 from shared import utils
9 9
10
10 class Index(webapp2.RequestHandler): # pragma: no cover 11 class Index(webapp2.RequestHandler): # pragma: no cover
12 @utils.read_access
11 def get(self): 13 def get(self):
12 self.response.write(open('templates/index.html').read() % { 14 self.response.write(open('templates/index.html').read() % {
13 'login_url': users.create_login_url(), 15 'login_url': users.create_login_url(),
14 'valid_user': bool(utils.is_valid_user()), 16 'valid_user': utils.has_permission('read'),
17 'host': utils.get_friendly_hostname(),
15 }) 18 })
OLDNEW
« no previous file with comments | « appengine/chromium_cq_status/app.yaml ('k') | appengine/chromium_cq_status/handlers/patch_status.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698