From f18bb9f336dbca42af6375a227232106325bf083 Mon Sep 17 00:00:00 2001 From: Qwann Date: Thu, 9 Mar 2017 17:27:58 +0100 Subject: [PATCH] permission added --- kfet/templates/kfet/home.html | 2 ++ kfet/views.py | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/kfet/templates/kfet/home.html b/kfet/templates/kfet/home.html index 6d4f163f..a4f9ee4c 100644 --- a/kfet/templates/kfet/home.html +++ b/kfet/templates/kfet/home.html @@ -19,11 +19,13 @@
?????
+ {% if perms.kfet.is_team %}
Fermer manuellement
+ {% endif %}
diff --git a/kfet/views.py b/kfet/views.py index 77bb061d..4278aa88 100644 --- a/kfet/views.py +++ b/kfet/views.py @@ -124,6 +124,11 @@ class UpdateForceClose(View): return HttpResponse("closed : %r at %s" % (force_close_get, time.isoformat())) + @method_decorator(login_required) + @method_decorator(teamkfet_required) + def dispatch(self, *args, **kwargs): + return super(UpdateForceClose, self).dispatch(*args, **kwargs) + @teamkfet_required def login_genericteam(request):