mirror of
https://github.com/inventree/InvenTree.git
synced 2026-07-04 14:10:52 +00:00
Fix signup warning (#12213)
- Should only fire on an actual signup attempt
This commit is contained in:
@@ -114,6 +114,9 @@ class RegistrationMixin:
|
|||||||
"""
|
"""
|
||||||
if registration_enabled(self.REGISTRATION_SETTING):
|
if registration_enabled(self.REGISTRATION_SETTING):
|
||||||
return True
|
return True
|
||||||
|
# Only warn when this is an actual signup submission, not when called as
|
||||||
|
# a feature-availability check during login or other auth flows.
|
||||||
|
if request and request.method == 'POST' and 'signup' in request.path:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f'INVE-W12: Signup attempt blocked, because registration is disabled via setting {self.REGISTRATION_SETTING}.'
|
f'INVE-W12: Signup attempt blocked, because registration is disabled via setting {self.REGISTRATION_SETTING}.'
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user