Remove project_id from task URLs
This commit is contained in:
@@ -23,7 +23,7 @@ class TaskModificationController extends BaseController
|
||||
if (! $this->helper->projectRole->canUpdateTask($task)) {
|
||||
throw new AccessForbiddenException(t('You are not allowed to update tasks assigned to someone else.'));
|
||||
}
|
||||
|
||||
|
||||
if (! $this->helper->projectRole->canChangeAssignee($task)) {
|
||||
throw new AccessForbiddenException(t('You are not allowed to change the assignee.'));
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class TaskModificationController extends BaseController
|
||||
$this->response->redirect($this->helper->url->to('DashboardController', 'tasks', ['user_id' => $this->userSession->getId()]));
|
||||
break;
|
||||
default:
|
||||
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', ['project_id' => $task['project_id'], 'task_id' => $task['id']]));
|
||||
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', ['task_id' => $task['id']]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ class TaskModificationController extends BaseController
|
||||
|
||||
if ($valid && $this->updateTask($task, $values, $errors)) {
|
||||
$this->flash->success(t('Task updated successfully.'));
|
||||
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])), true);
|
||||
$this->response->redirect($this->helper->url->to('TaskViewController', 'show', array('task_id' => $task['id'])), true);
|
||||
} else {
|
||||
$this->flash->failure(t('Unable to update your task.'));
|
||||
$this->edit($values, $errors);
|
||||
|
||||
Reference in New Issue
Block a user