* Fix project priv bug.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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');?>
|
||||
|
||||
Reference in New Issue
Block a user