From ac5f2f17aeae1124c69e2f65e3406d6afb5cc2be Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Thu, 30 Oct 2014 17:57:34 +0100 Subject: [PATCH] [objets, attributs] Ajout d'une classe objet inetOrgPerson MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parce que sinon, ça plante quand je récupère l'inetOrgPerson respbats dans mon jouet fuse. --- attributs.py | 2 +- objets.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/attributs.py b/attributs.py index 36f1bb6..050ac0b 100644 --- a/attributs.py +++ b/attributs.py @@ -395,7 +395,7 @@ class objectClass(Attr): can_view = [nounou, apprenti] def parse_value(self, val): - if val not in [ 'top', 'organizationalUnit', 'posixAccount', 'shadowAccount', + if val not in [ 'top', 'organizationalUnit', 'inetOrgPerson', 'posixAccount', 'shadowAccount', 'proprio', 'adherent', 'club', 'machine', 'machineCrans', 'borneWifi', 'machineWifi', 'machineFixe', 'x509Cert', 'TLSACert', 'baseCert', 'cransAccount', 'service', 'facture', 'freeMid', 'privateKey' ]: diff --git a/objets.py b/objets.py index ba99152..19d536a 100644 --- a/objets.py +++ b/objets.py @@ -719,6 +719,12 @@ def crans_object(classe): ObjectFactory.register(classe.ldap_name, classe) return classe +@crans_object +class InetOrgPerson(CransLdapObject): + ldap_name = "inetOrgPerson" + def __repr__(self): + return str(self.__class__.__name__) + " : cn=" + str(self['cn'][0]) + pass class proprio(CransLdapObject): u""" Un propriétaire de machine (adhérent, club…) """