This commit is contained in:
hufangzhou
2021-08-25 16:14:38 +08:00
parent 452aaac4d7
commit 3cb8c9be13

View File

@@ -42,11 +42,24 @@ class block extends control
if($module == 'my')
{
$modules = $this->lang->block->moduleList;
list($programModule, $programMethod) = explode('-', $this->config->programLink);
list($productModule, $productMethod) = explode('-', $this->config->productLink);
list($projectModule, $projectMethod) = explode('-', $this->config->projectLink);
list($executionModule, $executionMethod) = explode('-', $this->config->executionLink);
foreach($modules as $moduleKey => $moduleName)
{
if($moduleKey == 'todo') continue;
if(in_array($moduleKey, $this->app->user->rights['acls'])) unset($modules[$moduleKey]);
if(!common::hasPriv($moduleKey, 'index')) unset($modules[$moduleKey]);
$method = 'index';
if($moduleKey == 'program') $method = $programMethod;
if($moduleKey == 'product') $method = $productMethod;
if($moduleKey == 'project') $method = $projectMethod;
if($moduleKey == 'execution') $method = $executionMethod;
if(!common::hasPriv($moduleKey, $method)) unset($modules[$moduleKey]);
}
$closedBlock = isset($this->config->block->closed) ? $this->config->block->closed : '';