stah
(stah)
May 14, 2023, 11:52am
1
Dear community,
I would like to know if it’s possible to configure allowed email patterns for registration with Open edX tutor.
tried adding this in my config.yml:
“REGISTRATION_EMAIL_PATTERNS_ALLOWED” = [
"^.*@(.*\\.)?example\\.com$",
"(^\\w+\\.\\w+)@school\\.tld$"
]
But it hasn’t worked.
I would appreciate any help. Thank you.
It looks like that’s the example used in the documentation. Can you share something that’s more representative of what you’re actually trying to use in your deployment?
We did this using a plugin:
hooks.Filters.ENV_PATCHES.add_items([
(
"openedx-common-settings",
"""
REGISTRATION_EMAIL_PATTERNS_ALLOWED = [
"^.*@(.*\\.)?DOMAIN\\.ca$",
"(^\\w+\\.\\w+)@DOMAIN\\.ca$"
]
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'OPTIONS': {
'min_length': 9,
}
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
"""
)
])
2 Likes