8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-20 10:23:12 +00:00

Vue d'edition des droits fully fonctionnelle...

This commit is contained in:
Gabriel Detraz 2017-12-31 19:50:45 +01:00 committed by root
parent d7ab3e7291
commit 8ea20f93dd

View file

@ -248,6 +248,11 @@ def groups(request, user, userid):
group = GroupForm(request.POST or None, instance=user) group = GroupForm(request.POST or None, instance=user)
if group.is_valid(): if group.is_valid():
with transaction.atomic(), reversion.create_revision(): with transaction.atomic(), reversion.create_revision():
reversion.set_user(request.user)
reversion.set_comment("Champs modifié(s) : %s" % ', '.join(
field for field in group.changed_data
))
group.save()
messages.success(request, "Groupes changés avec succès") messages.success(request, "Groupes changés avec succès")
return redirect(reverse( return redirect(reverse(
'users:profil', 'users:profil',