From b45d32dad1800e500aa52f9c3a09087640574e03 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sun, 18 Dec 2016 19:01:28 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D1=83=20"=D0=BD=D0=B0=D0=BF?= =?UTF-8?q?=D0=BE=D0=BC=D0=BD=D0=B8=D1=82=D1=8C"=20=D0=B4=D0=BB=D1=8F=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D1=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taskapp/models.py | 1 + taskapp/views.py | 2 +- templates/taskapp/tasklist_all.html | 2 +- templates/taskapp/tasklist_own.html | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/taskapp/models.py b/taskapp/models.py index e991344..b709342 100644 --- a/taskapp/models.py +++ b/taskapp/models.py @@ -57,6 +57,7 @@ class Task(models.Model): ordering = ('-id',) permissions = ( ('can_viewall', 'Доступ ко всем задачам'), + ('can_remind', 'Напоминания о задачах') ) def finish(self, current_user): diff --git a/taskapp/views.py b/taskapp/views.py index 55e740a..9964a51 100644 --- a/taskapp/views.py +++ b/taskapp/views.py @@ -173,7 +173,7 @@ def task_begin(request, task_id): @login_required -@permission_required('taskapp.can_viewall') +@permission_required('taskapp.can_remind') def remind(request, task_id): task = get_object_or_404(Task, id=task_id) task.save(update_fields=['state']) diff --git a/templates/taskapp/tasklist_all.html b/templates/taskapp/tasklist_all.html index 1c893eb..b40e1a6 100644 --- a/templates/taskapp/tasklist_all.html +++ b/templates/taskapp/tasklist_all.html @@ -59,7 +59,7 @@ {% endif %} - {% if perms.taskapp.can_viewall %} + {% if perms.taskapp.can_remind %} diff --git a/templates/taskapp/tasklist_own.html b/templates/taskapp/tasklist_own.html index 1af5655..9c66875 100644 --- a/templates/taskapp/tasklist_own.html +++ b/templates/taskapp/tasklist_own.html @@ -38,7 +38,7 @@ - {% if perms.taskapp.can_viewall %} + {% if perms.taskapp.can_remind %}