Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

renamed decorator #56

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/apps/identity/intrastructure/django/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
_CallableT = TypeVar('_CallableT', bound=Callable[..., Any])


def redirect_logged_in_users(
def redirect_not_logged_in_users(
*,
redirect_field_name: str = '',
) -> Callable[[_CallableT], _CallableT]:
Expand Down
6 changes: 3 additions & 3 deletions server/apps/identity/views/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from server.apps.identity.container import container
from server.apps.identity.intrastructure.django.decorators import (
redirect_logged_in_users,
redirect_not_logged_in_users,
)
from server.apps.identity.intrastructure.django.forms import (
AuthenticationForm,
Expand All @@ -22,7 +22,7 @@


@final
@dispatch_decorator(redirect_logged_in_users())
@dispatch_decorator(redirect_not_logged_in_users())
@dispatch_decorator(axes_dispatch)
@dispatch_decorator(sensitive_post_parameters())
class LoginView(BaseLoginView):
Expand All @@ -32,7 +32,7 @@ class LoginView(BaseLoginView):


@final
@dispatch_decorator(redirect_logged_in_users())
@dispatch_decorator(redirect_not_logged_in_users())
@dispatch_decorator(sensitive_post_parameters())
class RegistrationView(RatelimitMixin, FormView[RegistrationForm]):
"""
Expand Down