Mauvais attribut dans le cas openldap
This commit is contained in:
@@ -200,7 +200,7 @@ index 69f3411..19ba7a1 100644
|
|||||||
Mise à niveau d'un compte enseignant
|
Mise à niveau d'un compte enseignant
|
||||||
"""
|
"""
|
||||||
diff --git usr/lib/python3/dist-packages/scribe/eoleldap.py usr/lib/python3/dist-packages/scribe/eoleldap.py
|
diff --git usr/lib/python3/dist-packages/scribe/eoleldap.py usr/lib/python3/dist-packages/scribe/eoleldap.py
|
||||||
index 45ec338..0f6125b 100644
|
index 45ec338..c3c6bfe 100644
|
||||||
--- usr/lib/python3/dist-packages/scribe/eoleldap.py
|
--- usr/lib/python3/dist-packages/scribe/eoleldap.py
|
||||||
+++ usr/lib/python3/dist-packages/scribe/eoleldap.py
|
+++ usr/lib/python3/dist-packages/scribe/eoleldap.py
|
||||||
@@ -8,21 +8,21 @@
|
@@ -8,21 +8,21 @@
|
||||||
@@ -276,12 +276,12 @@ index 45ec338..0f6125b 100644
|
|||||||
- dn = self.ldap_admin._search(ldap_filter, [attr])[0][0]
|
- dn = self.ldap_admin._search(ldap_filter, [attr])[0][0]
|
||||||
+ try:
|
+ try:
|
||||||
+ if _type == 'group':
|
+ if _type == 'group':
|
||||||
+ attr = 'rne'
|
+ attr = 'cn'
|
||||||
+ result = self.ldap_admin._search(ldap_filter, [attr])[0]
|
+ result = self.ldap_admin._search(ldap_filter, [attr])[0]
|
||||||
+ if _type == 'login':
|
+ if _type == 'login':
|
||||||
+ etab = [rne[1]['rne'][0] for rne in self.ldap_admin._search(f'(&(objectClass=eolegroupe)(type=Etablissement)(memberUid={name}))', ['rne'])]
|
+ etab = [cn[1]['cn'][0] for cn in self.ldap_admin._search(f'(&(objectClass=eolegroupe)(type=Etablissement)(memberUid={name}))', ['cn'])]
|
||||||
+ else:
|
+ else:
|
||||||
+ etab = result[1]['rne']
|
+ etab = result[1]['cn']
|
||||||
+ if not multi_etabs:
|
+ if not multi_etabs:
|
||||||
+ etab = etab[0]
|
+ etab = etab[0]
|
||||||
+ except:
|
+ except:
|
||||||
|
Reference in New Issue
Block a user