forked from DGNum/gestioCOF
Use authens in GestioBDS
This commit is contained in:
parent
9110e5b185
commit
3d830884b1
3 changed files with 15 additions and 2 deletions
|
@ -13,7 +13,7 @@ from .common import BASE_DIR, INSTALLED_APPS
|
||||||
|
|
||||||
ALLOWED_HOSTS = ["bds.ens.fr", "www.bds.ens.fr", "dev.cof.ens.fr"]
|
ALLOWED_HOSTS = ["bds.ens.fr", "www.bds.ens.fr", "dev.cof.ens.fr"]
|
||||||
|
|
||||||
INSTALLED_APPS += ["bds", "events", "clubs"]
|
INSTALLED_APPS += ["bds", "events", "clubs", "authens"]
|
||||||
|
|
||||||
STATIC_ROOT = os.path.join(
|
STATIC_ROOT = os.path.join(
|
||||||
os.path.dirname(os.path.dirname(BASE_DIR)), "public", "gestion", "static"
|
os.path.dirname(os.path.dirname(BASE_DIR)), "public", "gestion", "static"
|
||||||
|
@ -28,5 +28,14 @@ MEDIA_URL = "/gestion/media/"
|
||||||
# Auth-related stuff
|
# Auth-related stuff
|
||||||
# ---
|
# ---
|
||||||
|
|
||||||
LOGIN_URL = "admin:login"
|
AUTHENTICATION_BACKENDS = [
|
||||||
|
"django.contrib.auth.backends.ModelBackend",
|
||||||
|
"authens.backends.ENSCASBackend",
|
||||||
|
"authens.backends.OldCASBackend",
|
||||||
|
]
|
||||||
|
|
||||||
|
AUTHENS_USE_OLDCAS = False
|
||||||
|
|
||||||
|
LOGIN_URL = "authens:login"
|
||||||
LOGIN_REDIRECT_URL = "bds:home"
|
LOGIN_REDIRECT_URL = "bds:home"
|
||||||
|
LOGOUT_REDIRECT_URL = "bds:home"
|
||||||
|
|
|
@ -144,6 +144,9 @@ if "events" in settings.INSTALLED_APPS:
|
||||||
# → rename this when the old events system is out
|
# → rename this when the old events system is out
|
||||||
urlpatterns += [path("event_v2/", include("events.urls"))]
|
urlpatterns += [path("event_v2/", include("events.urls"))]
|
||||||
|
|
||||||
|
if "authens" in settings.INSTALLED_APPS:
|
||||||
|
urlpatterns.append(path("authens/", include("authens.urls")))
|
||||||
|
|
||||||
if "debug_toolbar" in settings.INSTALLED_APPS:
|
if "debug_toolbar" in settings.INSTALLED_APPS:
|
||||||
import debug_toolbar
|
import debug_toolbar
|
||||||
|
|
||||||
|
|
|
@ -17,3 +17,4 @@ wagtailmenus==3.*
|
||||||
wagtail-modeltranslation==0.10.*
|
wagtail-modeltranslation==0.10.*
|
||||||
django-cors-headers==2.2.0
|
django-cors-headers==2.2.0
|
||||||
django-js-reverse
|
django-js-reverse
|
||||||
|
authens==0.*
|
||||||
|
|
Loading…
Reference in a new issue