* Fix project priv bug.

This commit is contained in:
孙广明
2021-12-20 16:41:30 +08:00
parent 08758239f9
commit a5992d64e4
2 changed files with 1 additions and 8 deletions
-8
View File
@@ -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();
+1
View File
@@ -118,6 +118,7 @@ td.menus + td {border-left: 0;}
<?php $i = 1;?>
<?php foreach($moduleActions as $action => $actionLabel):?>
<?php if(!empty($lang->$moduleName->menus) and $action == 'browse') continue;;?>
<?php if($moduleName == 'project' and $action == 'index') continue;;?>
<?php if(!empty($version) and strpos($changelogs, ",$moduleName-$actionLabel,") === false) continue;?>
<div class='group-item'>
<?php echo html::checkbox("actions[{$moduleName}]", array($action => $lang->$moduleName->$actionLabel), isset($groupPrivs[$moduleName][$action]) ? $action : '', "title='{$lang->$moduleName->$actionLabel}'", 'inline');?>