diff --git a/module/block/model.php b/module/block/model.php index d6ad7e8a75..0a74b0391c 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -170,7 +170,6 @@ class blockModel extends model $data['doneTasks'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->andWhere('status')->eq('done')->fetch('count'); $data['bugs'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_BUG) ->where('assignedTo')->eq($this->app->user->account) - ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() //Fix bug #2373. ->andWhere('deleted')->eq(0) ->fetch('count'); $data['stories'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_STORY)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->andWhere('type')->eq('story')->fetch('count'); diff --git a/module/bug/model.php b/module/bug/model.php index fd043bcb52..3359a64ac4 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1383,8 +1383,6 @@ class bugModel extends model $bugs = $this->dao->select('*')->from(TABLE_BUG) ->where('deleted')->eq(0) ->beginIF($projectID)->andWhere('PRJ')->eq($projectID)->fi() - ->beginIF(!$this->app->user->admin)->andWhere('PRJ')->in($this->app->user->view->projects)->fi() - ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->sprints)->fi() ->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('status')->ne('closed')->fi() ->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi() ->orderBy($orderBy)