| OLD | NEW |
| 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 }) |
| OLD | NEW |