From a767115e92950639c3efcac4adfed7d0c06e7a27 Mon Sep 17 00:00:00 2001 From: liuhong Date: Wed, 15 Feb 2023 06:16:55 +0000 Subject: [PATCH] * Resolved feedback 2191. --- module/common/model.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index 2fe66fd85d..8dfe0defaa 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2464,6 +2464,12 @@ EOD; if(isset($this->app->user)) { + if($this->app->tab == 'project') + { + $projectPrivs = $this->loadModel('project')->processProjectPrivs(); + if(isset($projectPrivs->$module->$method)) return true; + } + $this->app->user = $this->session->user; if(!commonModel::hasPriv($module, $method)) { @@ -2659,11 +2665,7 @@ EOD; if($this->app->user->account == $program->openedBy or $this->app->user->account == $program->PM) $program->auth = 'extend'; - if($program->auth == 'extend') - { - $this->app->user->rights['rights'] = array_merge_recursive($programRightGroup, $rights); - $this->session->set('user', $this->app->user); - } + if($program->auth == 'extend') $this->app->user->rights['rights'] = array_merge_recursive($programRightGroup, $rights); if($program->auth == 'reset') { /* If priv way is reset, unset common program priv, and cover by program priv. */