Well, in fact I do need to call first admin/logout/ in the two cases. My problem is to call accounts/logout/ after that, if the authentication was done through CASBackend.
Le mardi 3 octobre 2017 14:02:33 UTC+2, Fabrice Pardo a écrit : > > Hi, > > I use both django.contrib.auth.backends.ModelBackend and > django_cas_ng.backends.CASBackend as authentication backends, > for two different targets: > - ModelBackend for superusers, which are not knowns from CASBackend > - CASBackend for all other authentication usages > > I have added these lines to urls.py > url(r'^accounts/login/$', django_cas_ng.views.login, name='login'), > url(r'^accounts/logout/$', django_cas_ng.views.logout, name='logout'), > > 1) Login problem: How can I redirect to accounts/login/ a page ending with > /?edit suffix? > Please note that I want to keep ModelBackend for admin/ pages > Well, this question is only to satisfy my curiosity because I have > introduced a middelware forcing CASBackend for all pages except admin/ and > accounts/ > and users are already authentified when they want to edit a page. > > 2) Logout problem is more serious: How can I ask "User Logout" menu > defined in cms_toolbars.py to redirect towards accounts/logout/ instead of > admin/logout/ ? > Please note that I want to keep admin/logout/ if I am authentified through > admin/login. > > Thanks > > -- > Fabrice > -- Message URL: https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id Unsubscribe: send a message to [email protected] --- You received this message because you are subscribed to the Google Groups "django CMS developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/django-cms-developers/09a78cd0-69cc-4454-a03f-7816122440c1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
