permission added

This commit is contained in:
Qwann 2017-03-09 17:27:58 +01:00
parent 8e7b9e2fd3
commit f18bb9f336
2 changed files with 7 additions and 0 deletions

View file

@ -19,11 +19,13 @@
<div class="content-left-top" id="open_status_parent"> <div class="content-left-top" id="open_status_parent">
<div class="line line-big" id="open_status">?????</div> <div class="line line-big" id="open_status">?????</div>
</div> </div>
{% if perms.kfet.is_team %}
<div class="buttons"> <div class="buttons">
<a class="btn btn-primary btn-lg" id="force_close_button"> <a class="btn btn-primary btn-lg" id="force_close_button">
Fermer manuellement Fermer manuellement
</a> </a>
</div> </div>
{% endif %}
</div> </div>
</div> </div>
<div class="col-sm-8 col-md-9 col-content-right"> <div class="col-sm-8 col-md-9 col-content-right">

View file

@ -124,6 +124,11 @@ class UpdateForceClose(View):
return HttpResponse("closed : %r at %s" % (force_close_get, return HttpResponse("closed : %r at %s" % (force_close_get,
time.isoformat())) time.isoformat()))
@method_decorator(login_required)
@method_decorator(teamkfet_required)
def dispatch(self, *args, **kwargs):
return super(UpdateForceClose, self).dispatch(*args, **kwargs)
@teamkfet_required @teamkfet_required
def login_genericteam(request): def login_genericteam(request):