middlewares: only forbid the oidc idp to administrators (#55022)

This commit is contained in:
Benjamin Dauvergne 2021-06-21 14:38:48 +02:00
parent 4319263774
commit 447f1c48bc
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ class CUTMiddleware(MiddlewareMixin):
from django.shortcuts import render
# interdit d'utiliser les IdP sur moncompte
if 'admin-cut' not in request.get_host() and request.path.startswith('/idp/'):
if 'admin-cut' not in request.get_host() and request.path.startswith('/idp/oidc/'):
return render(request, 'authentic2/cut-agents-forbidden.html')
# pas de pages /accounts/ sur moncompte