aboutsummaryrefslogtreecommitdiff
path: root/app/auth/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/auth/forms.py')
-rw-r--r--app/auth/forms.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/auth/forms.py b/app/auth/forms.py
index 06bad3f..5bff46f 100644
--- a/app/auth/forms.py
+++ b/app/auth/forms.py
@@ -42,7 +42,10 @@ class RegistrationForm(FlaskForm):
if email.data in current_app.config["USER_EMAILS"]:
return
if current_app.config["USER_EMAIL_DOMAINS"]:
- if not email.data in current_app.config["USER_EMAIL_DOMAINS"]:
+ if (
+ not email.data.split("@")[-1]
+ in current_app.config["USER_EMAIL_DOMAINS"]
+ ):
raise ValidationError(
"Access to AnnotateChange is restricted to "
"individuals with email addresses from specific "