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