aboutsummaryrefslogtreecommitdiff
path: root/config.py
diff options
context:
space:
mode:
authorGertjan van den Burg <gertjanvandenburg@gmail.com>2019-05-13 13:48:39 -0400
committerGertjan van den Burg <gertjanvandenburg@gmail.com>2019-05-13 13:48:39 -0400
commitf0860b77c78c9889bcbd6d6b88c81e3fc66ae193 (patch)
treeec99538af3b64a5e36c9b543e79f89151ada349f /config.py
parentAdd deployment instructions (diff)
downloadAnnotateChange-f0860b77c78c9889bcbd6d6b88c81e3fc66ae193.tar.gz
AnnotateChange-f0860b77c78c9889bcbd6d6b88c81e3fc66ae193.zip
add support for user filtering
Diffstat (limited to 'config.py')
-rw-r--r--config.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/config.py b/config.py
index 1f0ca83..865e098 100644
--- a/config.py
+++ b/config.py
@@ -50,3 +50,15 @@ class Config(object):
# task distribution settings
TASKS_MAX_PER_USER = 5
TASKS_NUM_PER_DATASET = 10
+
+ # user emails allowed
+ USER_EMAIL_DOMAINS = os.environ.get("USER_EMAIL_DOMAINS") or ""
+ USER_EMAIL_DOMAINS = [
+ x.split() for x in USER_EMAIL_DOMAINS.split(";")
+ ]
+ USER_EMAIL_DOMAINS = (
+ None if not USER_EMAIL_DOMAINS else USER_EMAIL_DOMAINS
+ )
+ USER_EMAILS = os.environ.get("USER_EMAILS") or ""
+ USER_EMAILS = [x.split() for x in USER_EMAILS.split(";")]
+ USER_EMAILS = None if not USER_EMAILS else USER_EMAILS