mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
fix(SSO): log error message when EMAIL_HOST is empty (#6067)
fixes #4553
This commit is contained in:
parent
676a97b709
commit
b59cf0f4a4
@ -228,7 +228,12 @@ class CustomSignupForm(SignupForm):
|
|||||||
|
|
||||||
def registration_enabled():
|
def registration_enabled():
|
||||||
"""Determine whether user registration is enabled."""
|
"""Determine whether user registration is enabled."""
|
||||||
return settings.EMAIL_HOST and (InvenTreeSetting.get_setting('LOGIN_ENABLE_REG') or InvenTreeSetting.get_setting('LOGIN_ENABLE_SSO_REG'))
|
if InvenTreeSetting.get_setting('LOGIN_ENABLE_REG') or InvenTreeSetting.get_setting('LOGIN_ENABLE_SSO_REG'):
|
||||||
|
if settings.EMAIL_HOST:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
logger.error("Registration cannot be enabled, because EMAIL_HOST is not configured.")
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
class RegistratonMixin:
|
class RegistratonMixin:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user