Compare commits
No commits in common. "4409911659b98059b48cc41cb3a43ca2b9c82d4e" and "e63d8630ccf2a95d9907f70106df90d927438099" have entirely different histories.
4409911659
...
e63d8630cc
|
@ -35,6 +35,7 @@ INSTALLED_APPS = [
|
||||||
# External apps
|
# External apps
|
||||||
'reversion',
|
'reversion',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
|
'cas',
|
||||||
|
|
||||||
# Django contrib
|
# Django contrib
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
|
@ -64,8 +65,14 @@ MIDDLEWARE = [
|
||||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||||
'django.middleware.locale.LocaleMiddleware',
|
'django.middleware.locale.LocaleMiddleware',
|
||||||
'django.contrib.sites.middleware.CurrentSiteMiddleware',
|
'django.contrib.sites.middleware.CurrentSiteMiddleware',
|
||||||
|
# 'cas.middleware.CASMiddleware',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
AUTHENTICATION_BACKENDS = (
|
||||||
|
'django.contrib.auth.backends.ModelBackend',
|
||||||
|
'cas.backends.CASBackend',
|
||||||
|
)
|
||||||
|
|
||||||
ROOT_URLCONF = 'med.urls'
|
ROOT_URLCONF = 'med.urls'
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
|
|
|
@ -16,6 +16,10 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
|
|
||||||
SERVER_EMAIL = 'club-med@crans.org'
|
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
|
# Security settings
|
||||||
SECURE_CONTENT_TYPE_NOSNIFF = False
|
SECURE_CONTENT_TYPE_NOSNIFF = False
|
||||||
SECURE_BROWSER_XSS_FILTER = False
|
SECURE_BROWSER_XSS_FILTER = False
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
# Copyright (C) 2017-2019 by BDE ENS Paris-Saclay
|
# Copyright (C) 2017-2019 by BDE ENS Paris-Saclay
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# 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.decorators import login_required
|
||||||
from django.contrib.auth.views import PasswordResetView
|
from django.contrib.auth.views import PasswordResetView
|
||||||
from django.urls import include, path
|
from django.urls import include, path
|
||||||
|
@ -41,4 +42,9 @@ urlpatterns = [
|
||||||
path('accounts/profile/', RedirectView.as_view(pattern_name='index')),
|
path('accounts/profile/', RedirectView.as_view(pattern_name='index')),
|
||||||
path('database/doc/', include('django.contrib.admindocs.urls')),
|
path('database/doc/', include('django.contrib.admindocs.urls')),
|
||||||
path('database/', admin_site.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'),
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue