mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Lors de la modification d'une machine, on maj aussi le ldap
This commit is contained in:
parent
82054aa8f2
commit
8ce74665d6
1 changed files with 10 additions and 0 deletions
|
@ -150,6 +150,16 @@ class IpList(models.Model):
|
|||
def __str__(self):
|
||||
return self.ipv4
|
||||
|
||||
@receiver(post_save, sender=Machine)
|
||||
def machine_post_save(sender, **kwargs):
|
||||
user = kwargs['instance'].user
|
||||
user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
||||
|
||||
@receiver(post_delete, sender=Machine)
|
||||
def machine_post_delete(sender, **kwargs):
|
||||
machine = kwargs['instance']
|
||||
user = machine.user
|
||||
user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
||||
|
||||
@receiver(post_save, sender=Interface)
|
||||
def interface_post_save(sender, **kwargs):
|
||||
|
|
Loading…
Reference in a new issue