mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-25 16:33:47 +00:00
Diverses erreurs
This commit is contained in:
parent
fd914066d4
commit
90c410c216
3 changed files with 6 additions and 6 deletions
|
@ -65,9 +65,9 @@ class IpList(models.Model):
|
||||||
@receiver(post_save, sender=Interface)
|
@receiver(post_save, sender=Interface)
|
||||||
def interface_post_save(sender, **kwargs):
|
def interface_post_save(sender, **kwargs):
|
||||||
user = kwargs['instance'].machine.user
|
user = kwargs['instance'].machine.user
|
||||||
user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
#user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
||||||
|
|
||||||
@receiver(post_delete, sender=Interface)
|
@receiver(post_delete, sender=Interface)
|
||||||
def interface_post_delete(sender, **kwargs):
|
def interface_post_delete(sender, **kwargs):
|
||||||
user = kwargs['instance'].machine.user
|
user = kwargs['instance'].machine.user
|
||||||
user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
#user.ldap_sync(base=False, access_refresh=False, mac_refresh=True)
|
||||||
|
|
|
@ -496,8 +496,8 @@ class LdapServiceUser(ldapdb.models.Model):
|
||||||
class BaseInfoForm(ModelForm):
|
class BaseInfoForm(ModelForm):
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(BaseInfoForm, self).__init__(*args, **kwargs)
|
super(BaseInfoForm, self).__init__(*args, **kwargs)
|
||||||
self.fields['name'].label = 'Nom'
|
self.fields['name'].label = 'Prénom'
|
||||||
self.fields['surname'].label = 'Prénom'
|
self.fields['surname'].label = 'Nom'
|
||||||
self.fields['school'].label = 'Établissement'
|
self.fields['school'].label = 'Établissement'
|
||||||
self.fields['comment'].label = 'Commentaire'
|
self.fields['comment'].label = 'Commentaire'
|
||||||
self.fields['room'].label = 'Chambre'
|
self.fields['room'].label = 'Chambre'
|
||||||
|
|
|
@ -130,7 +130,7 @@ def state(request, userid):
|
||||||
state = StateForm(request.POST or None, instance=user)
|
state = StateForm(request.POST or None, instance=user)
|
||||||
if state.is_valid():
|
if state.is_valid():
|
||||||
if state.has_changed():
|
if state.has_changed():
|
||||||
if state.cleaned_data['state'] == User.STATE_ARCHIVED:
|
if state.cleaned_data['state'] == User.STATE_ARCHIVE:
|
||||||
archive(user)
|
archive(user)
|
||||||
else:
|
else:
|
||||||
unarchive(user)
|
unarchive(user)
|
||||||
|
@ -251,7 +251,7 @@ def add_whitelist(request, userid):
|
||||||
reversion.set_comment("Création")
|
reversion.set_comment("Création")
|
||||||
messages.success(request, "Accès à titre gracieux accordé")
|
messages.success(request, "Accès à titre gracieux accordé")
|
||||||
return redirect("/users/profil/" + userid)
|
return redirect("/users/profil/" + userid)
|
||||||
if is_whitelisted(user):
|
if user.is_whitelisted():
|
||||||
messages.error(
|
messages.error(
|
||||||
request,
|
request,
|
||||||
"Attention, cet utilisateur a deja un accès gracieux actif"
|
"Attention, cet utilisateur a deja un accès gracieux actif"
|
||||||
|
|
Loading…
Reference in a new issue