mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-25 16:33:47 +00:00
Lors de la modification d'une machine, on maj aussi le ldap
This commit is contained in:
parent
e8f6f4f937
commit
1f3e7c0061
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