From 2df43b48b8e37bff3f1099e0f46ca4da502b3eeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Mon, 20 Dec 2021 11:23:33 +0800 Subject: [PATCH] * Fix project priv bug. --- module/common/model.php | 8 -------- module/project/view/managepriv.html.php | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index 6fffcfa2c0..e938631628 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -2147,13 +2147,6 @@ EOD; $inProject = isset($lang->navGroup->$module) && $lang->navGroup->$module == 'project'; if($inProject && $app->session->project && strpos(",{$app->user->rights['projects']},", ",{$app->session->project},") !== false) return true; - /* If module is project and method is execution, check for all execution privilege. */ - if($module == 'project' and $method == 'execution') - { - $module = 'execution'; - $method = 'all'; - } - /* If not super admin, check the rights. */ $rights = $app->user->rights['rights']; $acls = $app->user->rights['acls']; @@ -2200,7 +2193,6 @@ EOD; ->where('t1.project')->eq($program->id) ->andWhere('t2.account')->eq($this->app->user->account) ->fetchAll(); - if(empty($programRights)) return; /* Group priv by module the same as rights. */ $programRightGroup = array(); diff --git a/module/project/view/managepriv.html.php b/module/project/view/managepriv.html.php index bf223d2e70..6835b93817 100644 --- a/module/project/view/managepriv.html.php +++ b/module/project/view/managepriv.html.php @@ -118,6 +118,7 @@ td.menus + td {border-left: 0;} $actionLabel):?> $moduleName->menus) and $action == 'browse') continue;;?> +
$lang->$moduleName->$actionLabel), isset($groupPrivs[$moduleName][$action]) ? $action : '', "title='{$lang->$moduleName->$actionLabel}'", 'inline');?>