Commit 60522682 authored by Igor Biki's avatar Igor Biki
Browse files

ISTWMCS-4600 Making sure user has access to menu item.

parent 48965147
......@@ -102,10 +102,12 @@ class ContentManagementMenuBlock extends BlockBase implements ContainerFactoryPl
];
foreach ($item->subtree as $sub_item) {
$build[$id]['table'][$sec_id]['operations']['#links'][$sub_item->link->getPluginId()] = [
'title' => $sub_item->link->getTitle(),
'url' => $sub_item->link->getUrlObject(),
];
if ($sub_item->access->isAllowed()) {
$build[$id]['table'][$sec_id]['operations']['#links'][$sub_item->link->getPluginId()] = [
'title' => $sub_item->link->getTitle(),
'url' => $sub_item->link->getUrlObject(),
];
}
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment