mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Override monkey-patched LoginView from django-axes 3.0.3
- Fixes #1154 - Fixes #1138 Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
4e3216ce7c
commit
fc9ce8e6dd
5 files changed
+131
-89
No files matched your search
@@ -21,35 +21,30 @@ URLs for the Users module
|
||||
from django.conf.urls import url
|
||||
from django.urls import reverse_lazy
|
||||
|
||||
from stronghold.decorators import public
|
||||
from plinth.utils import non_admin_view
|
||||
from axes.decorators import axes_dispatch
|
||||
from plinth.modules.sso.views import SSOLoginView, SSOLogoutView
|
||||
from . import views
|
||||
from plinth.utils import non_admin_view
|
||||
from stronghold.decorators import public
|
||||
|
||||
from axes.decorators import watch_login
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^sys/users/$', views.UserList.as_view(), name='index'),
|
||||
url(r'^sys/users/create/$', views.UserCreate.as_view(), name='create'),
|
||||
url(r'^sys/users/(?P<slug>[\w.@+-]+)/edit/$',
|
||||
non_admin_view(views.UserUpdate.as_view()),
|
||||
name='edit'),
|
||||
non_admin_view(views.UserUpdate.as_view()), name='edit'),
|
||||
url(r'^sys/users/(?P<slug>[\w.@+-]+)/delete/$',
|
||||
views.UserDelete.as_view(),
|
||||
name='delete'),
|
||||
views.UserDelete.as_view(), name='delete'),
|
||||
url(r'^sys/users/(?P<slug>[\w.@+-]+)/change_password/$',
|
||||
non_admin_view(views.UserChangePassword.as_view()),
|
||||
name='change_password'),
|
||||
|
||||
# Authnz is handled by SSO
|
||||
url(r'^accounts/login/$',
|
||||
public(watch_login(SSOLoginView.as_view())),
|
||||
name='login'),
|
||||
public(axes_dispatch(SSOLoginView.as_view())), name='login'),
|
||||
url(r'^accounts/logout/$',
|
||||
non_admin_view(SSOLogoutView.as_view()),
|
||||
{'next_page': reverse_lazy('index')},
|
||||
name='logout'),
|
||||
{'next_page': reverse_lazy('index')}, name='logout'),
|
||||
url(r'^users/firstboot/$',
|
||||
public(views.FirstBootView.as_view()),
|
||||
name='firstboot'),
|
||||
public(views.FirstBootView.as_view()), name='firstboot'),
|
||||
]
|
||||
Reference in new issue
Block a user