mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
SSO: Use Login and Logout view classes instead of methods
- Closes #965 Signed-off-by: Joseph Nuthalpati <njoseph@thoughtworks.com> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
08e84001a8
commit
db479a7ae9
3 files changed
+27
-21
No files matched your search
@@ -24,10 +24,7 @@ from django.urls import reverse_lazy
|
||||
from stronghold.decorators import public
|
||||
|
||||
from plinth.utils import non_admin_view
|
||||
from plinth.modules.sso.views import (
|
||||
login as sso_login,
|
||||
logout as sso_logout
|
||||
)
|
||||
from plinth.modules.sso.views import SSOLoginView, SSOLogoutView
|
||||
from . import views
|
||||
|
||||
|
||||
@@ -42,8 +39,8 @@ urlpatterns = [
|
||||
non_admin_view(views.UserChangePassword.as_view()),
|
||||
name='change_password'),
|
||||
# Add Django's login/logout urls
|
||||
url(r'^accounts/login/$', public(sso_login), name='login'),
|
||||
url(r'^accounts/logout/$', public(sso_logout),
|
||||
url(r'^accounts/login/$', public(SSOLoginView.as_view()), name='login'),
|
||||
url(r'^accounts/logout/$', SSOLogoutView.as_view(),
|
||||
{'next_page': reverse_lazy('index')}, name='logout'),
|
||||
url(r'^users/firstboot/$', public(views.FirstBootView.as_view()),
|
||||
name='firstboot'),
|
||||
|
||||
Reference in new issue
Block a user