Prise en charge de l'attribut mailExterieur comme redirection.
This commit is contained in:
parent
60d7087c60
commit
962d9df0f3
5 changed files with 100 additions and 54 deletions
|
@ -25,6 +25,7 @@ except:
|
|||
# Machine sans mailman, les ML ne seront pas reconfigurées
|
||||
pass
|
||||
|
||||
CONN = crans_ldap()
|
||||
|
||||
class del_user:
|
||||
""" Suppression des fichiers d'un compte utilisateur """
|
||||
|
@ -114,11 +115,15 @@ class home:
|
|||
for args in self.args:
|
||||
anim('\t' + args)
|
||||
try:
|
||||
try:
|
||||
home, uid, login, mail_redirect = args.split(',')
|
||||
except ValueError:
|
||||
home, uid, login = args.split(',')
|
||||
mail_redirect = None
|
||||
login, oldLogin, oldHome = args.split(",")
|
||||
if login:
|
||||
adh = CONN.search("uid=%s" % (uid,))['adherent'][0]
|
||||
home = adh.home()
|
||||
uid = adh.uidNumber()
|
||||
mail_redirect = adh.email_exterieur()
|
||||
if oldHome and hostname == "zbee":
|
||||
home_service = del_user([oldLogin, oldHome])
|
||||
home_service.delete_zbee()
|
||||
homesplit = home.split("/")
|
||||
symlink = "/home-adh/%s" % (homesplit[-1],)
|
||||
### Home
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue