From 8c00c423913fc5a7dd45dedeec571c4cbb17ba22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 14 May 2018 15:06:24 +0200 Subject: [PATCH] grandlyon: use dedicated OU for GL agents --- grandlyon/scripts/sync-cut.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/grandlyon/scripts/sync-cut.py b/grandlyon/scripts/sync-cut.py index bdfdafb..b642596 100644 --- a/grandlyon/scripts/sync-cut.py +++ b/grandlyon/scripts/sync-cut.py @@ -7,11 +7,10 @@ from django.conf import settings from django.contrib.auth import get_user_model from authentic2.a2_rbac.models import OrganizationalUnit -from authentic2.a2_rbac.utils import get_default_ou from authentic2_auth_oidc.models import OIDCProvider, OIDCAccount ou_mapping = { - 'gl-guichet-numerique': get_default_ou(), + 'gl-guichet-numerique': OrganizationalUnit.objects.get(slug='grand-lyon'), 'bron': OrganizationalUnit.objects.get(slug='hobo-bron'), 'dardilly': OrganizationalUnit.objects.get(slug='hobo-dardilly'), 'oullins': OrganizationalUnit.objects.get(slug='hobo-oullins'), @@ -19,7 +18,7 @@ ou_mapping = { #'villeurbanne': OrganizationalUnit.objects.get(slug='hobo-villeurbanne'), # new names - 'gnm': get_default_ou(), + 'gnm': OrganizationalUnit.objects.get(slug='grand-lyon'), 'gnm-bron': OrganizationalUnit.objects.get(slug='hobo-bron'), 'gnm-dardilly': OrganizationalUnit.objects.get(slug='hobo-dardilly'), 'gnm-oullins': OrganizationalUnit.objects.get(slug='hobo-oullins'), @@ -31,7 +30,7 @@ ou_mapping = { 'gl-guichet-numerique-oullins': OrganizationalUnit.objects.get(slug='hobo-oullins'), 'gl-guichet-numerique-vaulx-en-velin': OrganizationalUnit.objects.get(slug='hobo-vaulx-en-velin'), - 'territoire': get_default_ou(), + 'territoire': OrganizationalUnit.objects.get(slug='grand-lyon'), } cut_agents = OIDCProvider.objects.get(name='cut-agents')