Fix signup warning
- Should only fire on an actual signup attempt
This commit is contained in:
parent
ca16e6ec0a
commit
4e8b29bf66
|
|
@ -114,9 +114,12 @@ class RegistrationMixin:
|
||||||
"""
|
"""
|
||||||
if registration_enabled(self.REGISTRATION_SETTING):
|
if registration_enabled(self.REGISTRATION_SETTING):
|
||||||
return True
|
return True
|
||||||
logger.warning(
|
# Only warn when this is an actual signup submission, not when called as
|
||||||
f'INVE-W12: Signup attempt blocked, because registration is disabled via setting {self.REGISTRATION_SETTING}.'
|
# a feature-availability check during login or other auth flows.
|
||||||
)
|
if request and request.method == 'POST' and 'signup' in request.path:
|
||||||
|
logger.warning(
|
||||||
|
f'INVE-W12: Signup attempt blocked, because registration is disabled via setting {self.REGISTRATION_SETTING}.'
|
||||||
|
)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def clean_email(self, email):
|
def clean_email(self, email):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue