mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-26 00:43:46 +00:00
Vue d'edition des droits fully fonctionnelle...
This commit is contained in:
parent
c7f853e87f
commit
15391ba6b0
1 changed files with 9 additions and 4 deletions
|
@ -248,11 +248,16 @@ 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():
|
||||||
messages.success(request, "Groupes changés avec succès")
|
reversion.set_user(request.user)
|
||||||
return redirect(reverse(
|
reversion.set_comment("Champs modifié(s) : %s" % ', '.join(
|
||||||
'users:profil',
|
field for field in group.changed_data
|
||||||
kwargs={'userid':str(userid)}
|
|
||||||
))
|
))
|
||||||
|
group.save()
|
||||||
|
messages.success(request, "Groupes changés avec succès")
|
||||||
|
return redirect(reverse(
|
||||||
|
'users:profil',
|
||||||
|
kwargs={'userid':str(userid)}
|
||||||
|
))
|
||||||
return form({'userform': group}, 'users/user.html', request)
|
return form({'userform': group}, 'users/user.html', request)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue