diff options
Diffstat (limited to 'app/Model')
-rw-r--r-- | app/Model/TaskFinder.php | 2 | ||||
-rw-r--r-- | app/Model/TaskPermission.php | 34 |
2 files changed, 2 insertions, 34 deletions
diff --git a/app/Model/TaskFinder.php b/app/Model/TaskFinder.php index a1aa0f58..28ddb88f 100644 --- a/app/Model/TaskFinder.php +++ b/app/Model/TaskFinder.php @@ -71,6 +71,8 @@ class TaskFinder extends Base 'tasks.priority', 'tasks.time_spent', 'tasks.time_estimated', + 'tasks.is_active', + 'tasks.creator_id', 'projects.name AS project_name' ) ->join(Project::TABLE, 'id', 'project_id') diff --git a/app/Model/TaskPermission.php b/app/Model/TaskPermission.php deleted file mode 100644 index b1e02589..00000000 --- a/app/Model/TaskPermission.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php - -namespace Kanboard\Model; - -use Kanboard\Core\Security\Role; - -/** - * Task permission model - * - * @package model - * @author Frederic Guillot - */ -class TaskPermission extends Base -{ - /** - * Return true if the user can remove a task - * - * Regular users can't remove tasks from other people - * - * @public - * @param array $task - * @return bool - */ - public function canRemoveTask(array $task) - { - if ($this->userSession->isAdmin() || $this->projectUserRole->getUserRole($task['project_id'], $this->userSession->getId()) === Role::PROJECT_MANAGER) { - return true; - } elseif (isset($task['creator_id']) && $task['creator_id'] == $this->userSession->getId()) { - return true; - } - - return false; - } -} |