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

Unified 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, 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
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/chromium_cq_status/handlers/index.py
diff --git a/appengine/chromium_cq_status/handlers/index.py b/appengine/chromium_cq_status/handlers/index.py
index 136f250483c6bdb36fde38e079bf1376e6144646..e472c34154836b8f57b01ec07472f6d49361b02e 100644
--- a/appengine/chromium_cq_status/handlers/index.py
+++ b/appengine/chromium_cq_status/handlers/index.py
@@ -7,9 +7,12 @@ import webapp2
from shared import utils
+
class Index(webapp2.RequestHandler): # pragma: no cover
+ @utils.read_access
def get(self):
self.response.write(open('templates/index.html').read() % {
'login_url': users.create_login_url(),
- 'valid_user': bool(utils.is_valid_user()),
+ 'valid_user': utils.has_permission('read'),
+ 'host': utils.get_friendly_hostname(),
})
« 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