Le mail_parsing dans attributs doit être minimal
* Le fait qu'un alias canonique soit Prenom.Nom@crans.org ou qu'un alias mail soit lowercase est un choix moral, pas une obligation de la syntaxe LDAP.
This commit is contained in:
parent
991a8efaa4
commit
7a63c55851
1 changed files with 4 additions and 8 deletions
12
attributs.py
12
attributs.py
|
@ -704,9 +704,10 @@ class canonicalAlias(mail):
|
||||||
category = 'mail'
|
category = 'mail'
|
||||||
ldap_name = "canonicalAlias"
|
ldap_name = "canonicalAlias"
|
||||||
|
|
||||||
def parse_value(self, mail):
|
# à spécifier pour les nouvelles valeurs
|
||||||
mail = u".".join([ a.capitalize() for a in mail.split(u'.', 1) ])
|
# def parse_value(self, mail):
|
||||||
super(canonicalAlias, self).parse_value(mail)
|
# mail = u".".join([ a.capitalize() for a in mail.split(u'.', 1) ])
|
||||||
|
# super(canonicalAlias, self).parse_value(mail)
|
||||||
|
|
||||||
@crans_attribute
|
@crans_attribute
|
||||||
class mailAlias(mail):
|
class mailAlias(mail):
|
||||||
|
@ -718,10 +719,6 @@ class mailAlias(mail):
|
||||||
category = 'mail'
|
category = 'mail'
|
||||||
ldap_name = "mailAlias"
|
ldap_name = "mailAlias"
|
||||||
|
|
||||||
def parse_value(self, mail):
|
|
||||||
mail = mail.lower()
|
|
||||||
super(mailAlias, self).parse_value(mail)
|
|
||||||
|
|
||||||
@crans_attribute
|
@crans_attribute
|
||||||
class mailExt(mail):
|
class mailExt(mail):
|
||||||
singlevalue = False
|
singlevalue = False
|
||||||
|
@ -733,7 +730,6 @@ class mailExt(mail):
|
||||||
ldap_name = "mailExt"
|
ldap_name = "mailExt"
|
||||||
|
|
||||||
def parse_value(self, mail):
|
def parse_value(self, mail):
|
||||||
mail = mail.lower()
|
|
||||||
# comme on utilise mailExt comme mail de secours si l'utilisateur
|
# comme on utilise mailExt comme mail de secours si l'utilisateur
|
||||||
# à perdu ses id crans, ça ne sert à rien de mettre ne adresse crans
|
# à perdu ses id crans, ça ne sert à rien de mettre ne adresse crans
|
||||||
if mail.endswith("@crans.org"):
|
if mail.endswith("@crans.org"):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue