Il faut tre nounou pour dtruire un compte nounou.

darcs-hash:20041003160457-41617-d3c455c88c3bf72e4c8d17bce6fde95ec898f398.gz
This commit is contained in:
pauget 2004-10-03 18:04:57 +02:00
parent 53c0e9b381
commit 11590c5f3f

View file

@ -22,9 +22,6 @@ else:
smtpserv = "localhost" smtpserv = "localhost"
# TODO :
# Interdire la modif des comptes nounou
import smtplib, sre, os, random, string, time, sys import smtplib, sre, os, random, string, time, sys
import ldap, ldap.modlist import ldap, ldap.modlist
@ -940,17 +937,21 @@ class base_proprietaire(base_classes_crans) :
def delete(self,comment='') : def delete(self,comment='') :
"""Destruction du proprietaire""" """Destruction du proprietaire"""
done = 0
for m in self.machines() : for m in self.machines() :
# Destruction machines # Destruction machines
m.delete(comment) m.delete(comment)
self._delete(self.dn,comment) self._delete(self.dn,comment)
if self.compte() : try :
args = self._data['uid'][0] + ',' if self.compte() :
args+= self._data['homeDirectory'][0] args = self._data['uid'][0] + ','
self.services_to_restart('del_user',[ args ] ) args+= self._data['homeDirectory'][0]
self.services_to_restart('del_user',[ args ] )
except :
# Si ne peux avoir de compte
pass
def save(self) : def save(self) :
""" """