From 0147c5b42c68fc56e95824b85162081335aae77f Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Thu, 13 Aug 2020 08:18:15 +0200 Subject: [PATCH] Revert CAS to make it works on Zamok --- med/settings.py | 7 ------- med/settings_local.example.py | 4 ---- med/urls.py | 6 ------ 3 files changed, 17 deletions(-) diff --git a/med/settings.py b/med/settings.py index 7e79e27..b9b08cd 100644 --- a/med/settings.py +++ b/med/settings.py @@ -35,7 +35,6 @@ INSTALLED_APPS = [ # External apps 'reversion', 'rest_framework', - 'cas', # Django contrib 'django.contrib.admin', @@ -65,14 +64,8 @@ MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.sites.middleware.CurrentSiteMiddleware', - # 'cas.middleware.CASMiddleware', ] -AUTHENTICATION_BACKENDS = ( - 'django.contrib.auth.backends.ModelBackend', - 'cas.backends.CASBackend', -) - ROOT_URLCONF = 'med.urls' TEMPLATES = [ diff --git a/med/settings_local.example.py b/med/settings_local.example.py index c2006a2..51fb051 100644 --- a/med/settings_local.example.py +++ b/med/settings_local.example.py @@ -16,10 +16,6 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' SERVER_EMAIL = 'club-med@crans.org' -CAS_SERVER_URL = "https://note.crans.org/cas/" -CAS_LOGOUT_COMPLETELY = True -CAS_PROVIDE_URL_TO_LOGOUT = True - # Security settings SECURE_CONTENT_TYPE_NOSNIFF = False SECURE_BROWSER_XSS_FILTER = False diff --git a/med/urls.py b/med/urls.py index ad4bff8..51e3f3d 100644 --- a/med/urls.py +++ b/med/urls.py @@ -2,7 +2,6 @@ # Copyright (C) 2017-2019 by BDE ENS Paris-Saclay # SPDX-License-Identifier: GPL-3.0-or-later -from cas import views as cas_views from django.contrib.auth.decorators import login_required from django.contrib.auth.views import PasswordResetView from django.urls import include, path @@ -42,9 +41,4 @@ urlpatterns = [ path('accounts/profile/', RedirectView.as_view(pattern_name='index')), path('database/doc/', include('django.contrib.admindocs.urls')), path('database/', admin_site.urls), - - # Include CAS authentication - # TODO Uncomment when NK20 will be ready - # path('admin/login/', cas_views.login, name='login'), - # path('admin/logout/', cas_views.logout, name='logout'), ]