Commit 7acbacbf authored by Gabriel Detraz's avatar Gabriel Detraz Committed by root
Browse files

Un permanencier peut entierrement modif une clef (demande darchou <3)

parent 75424a61
...@@ -290,10 +290,7 @@ def edit_clef(request, clefid): ...@@ -290,10 +290,7 @@ def edit_clef(request, clefid):
except Clef.DoesNotExist: except Clef.DoesNotExist:
messages.error(request, u"Entrée inexistante" ) messages.error(request, u"Entrée inexistante" )
return redirect("/users/index_clef/") return redirect("/users/index_clef/")
if request.user.has_perms(('bureau',)):
clef = ClefForm(request.POST or None, instance=clef_instance) clef = ClefForm(request.POST or None, instance=clef_instance)
else:
clef = BaseClefForm(request.POST or None, instance=clef_instance)
if clef.is_valid(): if clef.is_valid():
with transaction.atomic(), reversion.create_revision(): with transaction.atomic(), reversion.create_revision():
clef.save() clef.save()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment