add env var ENABLE_DOMAIN_CHECKER
when using localhost and standalone idhub instance we could avoid this checker to facilitate testing and deployment
This commit is contained in:
parent
4a0f234e6c
commit
16b8a33d6e
|
@ -36,7 +36,8 @@ class UserView(LoginRequiredMixin):
|
|||
err_txt = "User domain is {} which does not match server domain {}".format(
|
||||
request.get_host(), settings.DOMAIN
|
||||
)
|
||||
assert request.get_host() == settings.DOMAIN, err_txt
|
||||
if settings.ENABLE_DOMAIN_CHECKER:
|
||||
assert request.get_host() == settings.DOMAIN, err_txt
|
||||
self.admin_validated = cache.get("KEY_DIDS")
|
||||
response = super().get(request, *args, **kwargs)
|
||||
|
||||
|
@ -58,7 +59,8 @@ class UserView(LoginRequiredMixin):
|
|||
err_txt = "User domain is {} which does not match server domain {}".format(
|
||||
request.get_host(), settings.DOMAIN
|
||||
)
|
||||
assert request.get_host() == settings.DOMAIN, err_txt
|
||||
if settings.ENABLE_DOMAIN_CHECKER:
|
||||
assert request.get_host() == settings.DOMAIN, err_txt
|
||||
self.admin_validated = cache.get("KEY_DIDS")
|
||||
response = super().post(request, *args, **kwargs)
|
||||
url = self.check_gdpr()
|
||||
|
|
|
@ -240,5 +240,6 @@ OIDC_ORGS = config('OIDC_ORGS', '')
|
|||
ENABLE_EMAIL = config('ENABLE_EMAIL', default=True, cast=bool)
|
||||
CREATE_TEST_USERS = config('CREATE_TEST_USERS', default=False, cast=bool)
|
||||
ENABLE_2FACTOR_AUTH = config('ENABLE_2FACTOR_AUTH', default=True, cast=bool)
|
||||
ENABLE_DOMAIN_CHECKER = config('ENABLE_DOMAIN_CHECKER', default=True, cast=bool)
|
||||
COMMIT = config('COMMIT', default='')
|
||||
|
||||
|
|
Loading…
Reference in a new issue