From 462a9e0f2d6f9693917992378370444e74206685 Mon Sep 17 00:00:00 2001
From: Yohann D'ANELLO
Date: Mon, 9 Mar 2020 22:13:11 +0100
Subject: [PATCH 01/29] Fix CAS settings
---
note_kfet/settings/__init__.py | 5 +++++
note_kfet/settings/base.py | 2 ++
2 files changed, 7 insertions(+)
diff --git a/note_kfet/settings/__init__.py b/note_kfet/settings/__init__.py
index 6d871599..c1df7477 100644
--- a/note_kfet/settings/__init__.py
+++ b/note_kfet/settings/__init__.py
@@ -1,4 +1,9 @@
+# Copyright (C) 2018-2020 by BDE ENS Paris-Saclay
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+from django.utils.translation import gettext_lazy as _
import re
+
from .base import *
diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py
index 4fe12fbf..3a5c3200 100644
--- a/note_kfet/settings/base.py
+++ b/note_kfet/settings/base.py
@@ -39,6 +39,8 @@ INSTALLED_APPS = [
'polymorphic',
'crispy_forms',
'django_tables2',
+ 'cas_server',
+ 'cas',
# Django contrib
'django.contrib.admin',
'django.contrib.admindocs',
From 83b1ad47515b6fa9ce875709b4813bbe92d823ce Mon Sep 17 00:00:00 2001
From: Yohann D'ANELLO
Date: Mon, 9 Mar 2020 22:23:47 +0100
Subject: [PATCH 02/29] Multi-connexions
---
note_kfet/urls.py | 4 ++--
templates/registration/login.html | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/note_kfet/urls.py b/note_kfet/urls.py
index 896c0655..407659f8 100644
--- a/note_kfet/urls.py
+++ b/note_kfet/urls.py
@@ -37,8 +37,8 @@ if "cas" in settings.INSTALLED_APPS:
from cas import views as cas_views
urlpatterns += [
# Include CAS Client routers
- path('accounts/login/', cas_views.login, name='login'),
- path('accounts/logout/', cas_views.logout, name='logout'),
+ path('accounts/login/cas/', cas_views.login, name='cas_login'),
+ path('accounts/logout/cas/', cas_views.logout, name='cas_logout'),
]
if "debug_toolbar" in settings.INSTALLED_APPS:
diff --git a/templates/registration/login.html b/templates/registration/login.html
index 04ef8d7d..5a4322d1 100644
--- a/templates/registration/login.html
+++ b/templates/registration/login.html
@@ -17,6 +17,10 @@ SPDX-License-Identifier: GPL-2.0-or-later
{% endif %}
+
+