From aa1c77ce60c8fff16b9cb45986970431702fb899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Mon, 14 Apr 2014 03:23:47 +0200 Subject: [PATCH] =?UTF-8?q?[objets]=20Un=20peu=20plus=20de=20clart=C3=A9?= =?UTF-8?q?=20sur=20le=20repr=20d'un=20adh=C3=A9rent,=20et=20sur=20=5F=5Fs?= =?UTF-8?q?etitem=5F=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- objets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/objets.py b/objets.py index ec2260a..63c3440 100644 --- a/objets.py +++ b/objets.py @@ -570,7 +570,7 @@ class CransLdapObject(object): if mixed_attrs: # Tests de droits. if not mixed_attrs[0].is_modifiable(self.conn.droits + self.conn._check_parent(self.dn) + self.conn._check_self(self.dn)): - raise EnvironmentError("Vous ne pouvez pas toucher aux attributs de type %r." % (attr)) + raise EnvironmentError("Vous ne pouvez pas modifier l'attribut %r de l'objet %r." % (attr, self)) # On ajoute des locks sur les nouvelles valeurs @@ -1127,7 +1127,7 @@ class adherent(proprio): ldap_name = "adherent" def __repr__(self): - return str(self.__class__) + " : aid=" + str(self['aid'][0]) + return "Adhérent : " + str(self['prenom'][0]) + " " + str(self['nom'][0]) def __init__(self, *args, **kwargs): super(adherent, self).__init__(*args, **kwargs)