Merge pull request #3194

This commit is contained in:
Frédéric Guillot
2017-04-12 20:20:00 -04:00
committed by GitHub

View File

@@ -23,7 +23,9 @@ class TaskModificationController extends BaseController
{
$task = $this->getTask();
$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->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
}