fix duplicate Class naming

This commit is contained in:
Jens Langhammer 2019-02-16 10:54:15 +01:00
parent d6f4832e90
commit 89722336e3
3 changed files with 3 additions and 3 deletions

View File

@ -121,5 +121,5 @@ class AuthenticationView(UserPassesTestMixin, View):
del self.request.session[key] del self.request.session[key]
LOGGER.debug("Cleaned up sessions") LOGGER.debug("Cleaned up sessions")
class MFAPermissionDeniedView(PermissionDeniedView): class FactorPermissionDeniedView(PermissionDeniedView):
"""User could not be authenticated""" """User could not be authenticated"""

View File

@ -21,7 +21,7 @@ core_urls = [
path('auth/sign_up/', authentication.SignUpView.as_view(), name='auth-sign-up'), path('auth/sign_up/', authentication.SignUpView.as_view(), name='auth-sign-up'),
path('auth/process/', view.AuthenticationView.as_view(), name='auth-process'), path('auth/process/', view.AuthenticationView.as_view(), name='auth-process'),
path('auth/process/<slug:factor>/', view.AuthenticationView.as_view(), name='auth-process'), path('auth/process/<slug:factor>/', view.AuthenticationView.as_view(), name='auth-process'),
path('auth/process/denied/', view.MFAPermissionDeniedView.as_view(), name='auth-denied'), path('auth/process/denied/', view.FactorPermissionDeniedView.as_view(), name='auth-denied'),
# User views # User views
path('user/', user.UserSettingsView.as_view(), name='user-settings'), path('user/', user.UserSettingsView.as_view(), name='user-settings'),
path('user/delete/', user.UserDeleteView.as_view(), name='user-delete'), path('user/delete/', user.UserDeleteView.as_view(), name='user-delete'),

View File

@ -65,7 +65,7 @@ class LoginView(UserPassesTestMixin, FormView):
if AuthenticationView.SESSION_FACTOR in self.request.session: if AuthenticationView.SESSION_FACTOR in self.request.session:
del self.request.session[AuthenticationView.SESSION_FACTOR] del self.request.session[AuthenticationView.SESSION_FACTOR]
self.request.session[AuthenticationView.SESSION_PENDING_USER] = pre_user.pk self.request.session[AuthenticationView.SESSION_PENDING_USER] = pre_user.pk
return redirect(reverse('passbook_core:mfa')) return redirect(reverse('passbook_core:auth-process'))
def invalid_login(self, request: HttpRequest, disabled_user: User = None) -> HttpResponse: def invalid_login(self, request: HttpRequest, disabled_user: User = None) -> HttpResponse:
"""Handle login for disabled users/invalid login attempts""" """Handle login for disabled users/invalid login attempts"""