2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 03:56:43 +00:00
- registraton -> registration
This commit is contained in:
Oliver 2024-12-25 07:38:39 +11:00 committed by GitHub
parent fe68dc7318
commit c79fc281fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -117,7 +117,7 @@ def registration_enabled():
return False
class RegistratonMixin:
class RegistrationMixin:
"""Mixin to check if registration should be enabled."""
def is_open_for_signup(self, request, *args, **kwargs):
@ -188,7 +188,7 @@ class CustomUrlMixin:
class CustomAccountAdapter(
CustomUrlMixin, RegistratonMixin, OTPAdapter, DefaultAccountAdapter
CustomUrlMixin, RegistrationMixin, OTPAdapter, DefaultAccountAdapter
):
"""Override of adapter to use dynamic settings."""
@ -215,7 +215,7 @@ class CustomAccountAdapter(
class CustomSocialAccountAdapter(
CustomUrlMixin, RegistratonMixin, DefaultSocialAccountAdapter
CustomUrlMixin, RegistrationMixin, DefaultSocialAccountAdapter
):
"""Override of adapter to use dynamic settings."""

View File

@ -10,19 +10,19 @@ from allauth.socialaccount.models import SocialAccount, SocialLogin
from common.models import InvenTreeSetting
from InvenTree import sso
from InvenTree.auth_overrides import RegistratonMixin
from InvenTree.auth_overrides import RegistrationMixin
from InvenTree.unit_test import InvenTreeAPITestCase
class Dummy:
"""Simulate super class of RegistratonMixin."""
"""Simulate super class of RegistrationMixin."""
def save_user(self, _request, user: User, *args) -> User:
"""This method is only used that the super() call of RegistrationMixin does not fail."""
return user
class MockRegistrationMixin(RegistratonMixin, Dummy):
class MockRegistrationMixin(RegistrationMixin, Dummy):
"""Mocked implementation of the RegistrationMixin."""