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 %}