* fix bug #34018.
This commit is contained in:
@@ -660,6 +660,9 @@ class docModel extends model
|
||||
->andWhere('t1.id')->in(array_keys($docIDList))
|
||||
->andWhere('t2.action')->eq($type)
|
||||
->andWhere('t2.actor')->eq($this->app->user->account)
|
||||
->beginIF(!common::hasPriv('doc', 'productSpace'))->andWhere('t3.type')->ne('product')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'projectSpace'))->andWhere('t3.type')->notIN('project,execution')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'tableContents'))->andWhere('t3.type')->ne('custom')->fi()
|
||||
->beginIF($browseType == 'all' or $browseType == 'bysearch')->andWhere("(t1.status = 'normal' or (t1.status = 'draft' and t1.addedBy='{$this->app->user->account}'))")->fi()
|
||||
->beginIF($browseType == 'draft')->andWhere('t1.status')->eq('draft')->andWhere('t1.addedBy')->eq($this->app->user->account)->fi()
|
||||
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
|
||||
@@ -676,6 +679,9 @@ class docModel extends model
|
||||
->andWhere('t1.id')->in(array_keys($docIDList))
|
||||
->andWhere('t1.vision')->eq($this->config->vision)
|
||||
->andWhere('t1.addedBy')->eq($this->app->user->account)
|
||||
->beginIF(!common::hasPriv('doc', 'productSpace'))->andWhere('t2.type')->ne('product')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'projectSpace'))->andWhere('t2.type')->notIN('project,execution')->fi()
|
||||
->beginIF(!common::hasPriv('doc', 'tableContents'))->andWhere('t2.type')->ne('custom')->fi()
|
||||
->beginIF($browseType == 'draft')->andWhere('t1.status')->eq('draft')->andWhere('t1.addedBy')->eq($this->app->user->account)->fi()
|
||||
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
|
||||
->orderBy($orderBy)
|
||||
|
||||
Reference in New Issue
Block a user