diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-04 21:51:38 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-04 21:51:38 -0400 |
commit | 6bdc25490f02649242b1d96025f8da1f4c41884b (patch) | |
tree | ab30b54786c0c08f85facb6d0703f7837b4bc471 /app/Model/TaskPermission.php | |
parent | 60c8867feeeefcf160fb1432419887f17a0d957b (diff) |
Unify task drop-down menu between different views
Diffstat (limited to 'app/Model/TaskPermission.php')
-rw-r--r-- | app/Model/TaskPermission.php | 34 |
1 files changed, 0 insertions, 34 deletions
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; - } -} |