From b7fc85e6212a16fc0ac48dcb6b920d8446867bd0 Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 7 Dec 2020 10:17:47 +0800 Subject: [PATCH] * Fix bug#3667. --- module/block/model.php | 1 - module/bug/model.php | 1 - 2 files changed, 2 deletions(-) diff --git a/module/block/model.php b/module/block/model.php index 3d01b8ce1a..501e8ca514 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -172,7 +172,6 @@ class blockModel extends model $data['tasks'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->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 bc3e6302c4..c736c9cbbd 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1406,7 +1406,6 @@ class bugModel extends model if(!$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array(); $bugs = $this->dao->select('*')->from(TABLE_BUG) ->where('deleted')->eq(0) - ->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->projects)->fi() ->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('status')->ne('closed')->fi() ->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi() ->orderBy($orderBy)