* fix for block by priv.
This commit is contained in:
@@ -216,9 +216,16 @@ class block extends control
|
||||
if($this->block->initBlock($module)) die(js::reload());
|
||||
}
|
||||
|
||||
$acls = $this->app->user->rights['acls'];
|
||||
$shortBlocks = $longBlocks = array();
|
||||
foreach($blocks as $key => $block)
|
||||
{
|
||||
if(!empty($block->source) and !empty($acls['views']) and !isset($acls['views'][$block->source]))
|
||||
{
|
||||
unset($blocks[$key]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if($this->config->global->flow == 'onlyStory' and $block->source != 'product' and $block->source != 'todo' and $block->block != 'dynamic') unset($blocks[$key]);
|
||||
if($this->config->global->flow == 'onlyTask' and $block->source != 'project' and $block->source != 'todo' and $block->block != 'dynamic') unset($blocks[$key]);
|
||||
if($this->config->global->flow == 'onlyTest' and $block->source != 'qa' and $block->source != 'todo' and $block->block != 'dynamic') unset($blocks[$key]);
|
||||
|
||||
@@ -207,7 +207,6 @@ class blockModel extends model
|
||||
{
|
||||
$flow = isset($this->config->global->flow) ? $this->config->global->flow : 'full';
|
||||
$blocks = $module == 'my' ? $this->lang->block->default[$flow][$module] : $this->lang->block->default[$module];
|
||||
$acls = $this->app->user->rights['acls'];
|
||||
$account = $this->app->user->account;
|
||||
|
||||
/* Mark this app has init. */
|
||||
@@ -215,12 +214,6 @@ class blockModel extends model
|
||||
$this->loadModel('setting')->setItem("$account.$module.block.initVersion", $this->config->block->version);
|
||||
foreach($blocks as $index => $block)
|
||||
{
|
||||
if(!empty($block['source']) and !empty($acls) and !isset($acls['views'][$block['source']]))
|
||||
{
|
||||
unset($blocks[$index]);
|
||||
continue;
|
||||
}
|
||||
|
||||
$block['order'] = $index;
|
||||
$block['module'] = $module;
|
||||
$block['account'] = $account;
|
||||
|
||||
Reference in New Issue
Block a user