userSession->isAdmin() || $this->projectPermission->isManager($task['project_id'], $this->userSession->getId())) { return true; } elseif (isset($task['creator_id']) && $task['creator_id'] == $this->userSession->getId()) { return true; } return false; } }