diff --git a/module/common/model.php b/module/common/model.php index ae7365a2c4..bec15fb23a 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2110,6 +2110,8 @@ EOD; if(isset($this->app->user)) { + if(in_array($module, $this->config->programPriv->waterfall)) return true; + $this->app->user = $this->session->user; if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method); } diff --git a/module/project/model.php b/module/project/model.php index 2546f3e5d0..206c4528f1 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -127,12 +127,6 @@ class projectModel extends model if($projectID and strpos(",{$this->app->user->view->projects},", ",{$this->session->project},") === false and !empty($projects)) $this->accessDenied(); } - /* Reset program priv. */ - $moduleName = $this->app->getModuleName(); - $methodName = $this->app->getMethodName(); - $this->loadModel('common')->resetProjectPriv($this->session->project); - if(!$this->common->isOpenMethod($moduleName, $methodName) and !commonModel::hasPriv($moduleName, $methodName)) $this->common->deny($moduleName, $methodName, false); - return $this->session->project; } @@ -2080,6 +2074,13 @@ class projectModel extends model } $this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod); + + /* Reset project priv. */ + $moduleName = $this->app->getModuleName(); + $methodName = $this->app->getMethodName(); + + $this->loadModel('common')->resetProjectPriv($objectID); + if(!$this->common->isOpenMethod($moduleName, $methodName) and !commonModel::hasPriv($moduleName, $methodName)) $this->common->deny($moduleName, $methodName, false); common::setMenuVars('project', $objectID); } }