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

Unified Diff: appengine/chromium_cq_status/shared/config.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/makefile ('k') | appengine/chromium_cq_status/shared/test/utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/chromium_cq_status/shared/config.py
diff --git a/appengine/chromium_cq_status/shared/config.py b/appengine/chromium_cq_status/shared/config.py
index 2c8ce81560dc49b2f42df0c83adfd7b29668944c..e14b1efbc418bd9db53be41b516099baf343c122 100644
--- a/appengine/chromium_cq_status/shared/config.py
+++ b/appengine/chromium_cq_status/shared/config.py
@@ -35,4 +35,20 @@ TAG_ISSUE = 'issue=%s'
TAG_PATCHSET = 'patchset=%s'
TAG_CODEREVIEW_HOSTNAME = 'codereview_hostname=%s'
TRYJOBVERIFIER = 'try job'
-VALID_EMAIL_RE = re.compile(r'^.*@(chromium\.org|google\.com)$')
+
+# Maps hosts -> operation -> (either 'everyone' or a regex on email).
+HOST_ACLS = {
+ 'chromium-cq-status.appspot.com': {
+ 'read': 'everyone',
+ 'write': re.compile(r'^.*@(chromium\.org|google\.com)$'),
+ },
+ 'internal-cq-status.appspot.com': {
+ 'read': re.compile(r'^.*@google\.com$'),
+ 'write': re.compile(r'^.*@google\.com$'),
+ },
+ # Special case for development and default in tests.
+ 'Development': {
+ 'read': 'everyone',
+ 'write': re.compile(r'^.*@chromium\.org$'),
+ },
+}
« no previous file with comments | « appengine/chromium_cq_status/makefile ('k') | appengine/chromium_cq_status/shared/test/utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698