People should not see any tasks during a search when they are not associated to a project
This commit is contained in:
@@ -18,6 +18,10 @@ Improvements:
|
|||||||
* Add Task, User and Project metadata for plugin creators
|
* Add Task, User and Project metadata for plugin creators
|
||||||
* Do not show scroll-bars when a column is collapsed (IE)
|
* Do not show scroll-bars when a column is collapsed (IE)
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* People should not see any tasks during a search when they are not associated to a project
|
||||||
|
|
||||||
Version 1.0.19
|
Version 1.0.19
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
|||||||
@@ -227,10 +227,15 @@ class App extends Base
|
|||||||
public function autocomplete()
|
public function autocomplete()
|
||||||
{
|
{
|
||||||
$search = $this->request->getStringParam('term');
|
$search = $this->request->getStringParam('term');
|
||||||
|
$projects = $this->projectPermission->getActiveMemberProjectIds($this->userSession->getId());
|
||||||
|
|
||||||
|
if (empty($projects)) {
|
||||||
|
$this->response->json(array());
|
||||||
|
}
|
||||||
|
|
||||||
$filter = $this->taskFilterAutoCompleteFormatter
|
$filter = $this->taskFilterAutoCompleteFormatter
|
||||||
->create()
|
->create()
|
||||||
->filterByProjects($this->projectPermission->getActiveMemberProjectIds($this->userSession->getId()))
|
->filterByProjects($projects)
|
||||||
->excludeTasks(array($this->request->getIntegerParam('exclude_task_id')));
|
->excludeTasks(array($this->request->getIntegerParam('exclude_task_id')));
|
||||||
|
|
||||||
// Search by task id or by title
|
// Search by task id or by title
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class Search extends Base
|
|||||||
->setOrder('tasks.id')
|
->setOrder('tasks.id')
|
||||||
->setDirection('DESC');
|
->setDirection('DESC');
|
||||||
|
|
||||||
if ($search !== '') {
|
if ($search !== '' && ! empty($projects)) {
|
||||||
$query = $this
|
$query = $this
|
||||||
->taskFilter
|
->taskFilter
|
||||||
->search($search)
|
->search($search)
|
||||||
|
|||||||
Reference in New Issue
Block a user