Bug: Improve task update restriction
the function "checkPermission" has been removed and replaced with "projectRole->canUpdateTask"
This commit is contained in:
parent
660ba7b482
commit
ca562bb909
|
|
@ -23,7 +23,9 @@ class TaskModificationController extends BaseController
|
||||||
{
|
{
|
||||||
$task = $this->getTask();
|
$task = $this->getTask();
|
||||||
$values = array('id' => $task['id'], 'date_started' => time());
|
$values = array('id' => $task['id'], 'date_started' => time());
|
||||||
$this->checkPermission($task, $values);
|
if (! $this->helper->projectRole->canUpdateTask($task)) {
|
||||||
|
throw new AccessForbiddenException(t('You are not allowed to update tasks assigned to someone else.'));
|
||||||
|
}
|
||||||
$this->taskModificationModel->update($values);
|
$this->taskModificationModel->update($values);
|
||||||
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
|
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue