From ce008e109128c2a5e703947e9b7c40eabcc96e11 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 21 Sep 2011 16:48:28 +0200 Subject: [PATCH] use cas --- redakcja/settings/common.py | 2 ++ redakcja/urls.py | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/redakcja/settings/common.py b/redakcja/settings/common.py index 9ff3805c..9d6e175e 100644 --- a/redakcja/settings/common.py +++ b/redakcja/settings/common.py @@ -81,6 +81,7 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django_cas.middleware.CASMiddleware', 'django.middleware.doc.XViewMiddleware', 'pagination.middleware.PaginationMiddleware', @@ -89,6 +90,7 @@ MIDDLEWARE_CLASSES = ( AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', + 'django_cas.backends.CASBackend', ) ROOT_URLCONF = 'redakcja.urls' diff --git a/redakcja/urls.py b/redakcja/urls.py index 1d76ee80..4aedf58f 100644 --- a/redakcja/urls.py +++ b/redakcja/urls.py @@ -9,8 +9,11 @@ admin.autodiscover() urlpatterns = patterns('', # Auth - url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'), - url(r'^accounts/logout/$', 'catalogue.views.logout_then_redirect', name='logout'), + #url(r'^accounts/login/$', 'django.contrib.auth.views.login', name='login'), + #url(r'^accounts/logout/$', 'catalogue.views.logout_then_redirect', name='logout'), + + url(r'^accounts/login/$', 'django_cas.views.login', name='login'), + url(r'^accounts/logout/$', 'django_cas.views.logout', name='logout'), # Admin panel (r'^admin/filebrowser/', include('filebrowser.urls')), -- 2.20.1