diff --git a/module/kanban/control.php b/module/kanban/control.php index 27d7e1c65a..8e584869a0 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -235,13 +235,14 @@ class kanban extends control $space = $this->kanban->getSpaceById($spaceID); $spaceUsers = $spaceID == 0 ? ',' : trim($space->owner) . ',' . trim($space->team); - $users = $this->loadModel('user')->getPairs('noclosed|nodeleted', '', 0, $spaceUsers); + $spacePairs = array(0 => '') + $this->kanban->getSpacePairs($type); + $users = isset($spacePairs[$spaceID]) ? $this->loadModel('user')->getPairs('noclosed|nodeleted', '', 0, $spaceUsers) : array(); $whitelist = (isset($space->whitelist) and !empty($space->whitelist)) ? $space->whitelist : ','; $this->view->users = $users; - $this->view->whitelist = $this->user->getPairs('noclosed|nodeleted', '', 0, $whitelist); + $this->view->whitelist = isset($spacePairs[$spaceID]) ? $this->user->getPairs('noclosed|nodeleted', '', 0, $whitelist) : array(); $this->view->spaceID = $spaceID; - $this->view->spacePairs = array(0 => '') + $this->kanban->getSpacePairs($type); + $this->view->spacePairs = $spacePairs; $this->view->type = $type; $this->view->typeList = $this->lang->kanbanspace->featureBar; $this->view->kanbans = array('' => '') + $this->kanban->getPairs();