Deny access to part import tool without permission and added to tools menu

This commit is contained in:
Jan Böhmer 2023-03-13 22:02:55 +01:00
parent bd5ee837f4
commit 9ac8098f15
2 changed files with 8 additions and 0 deletions

View file

@ -143,6 +143,12 @@ class ToolsTreeBuilder
$this->urlGenerator->generate('tools_ic_logos')
))->setIcon('fa-treeview fa-fw fa-solid fa-flag');
}
if ($this->security->isGranted('@parts.import')) {
$nodes[] = (new TreeViewNode(
$this->translator->trans('parts.import.title'),
$this->urlGenerator->generate('parts_import')
))->setIcon('fa-treeview fa-fw fa-solid fa-file-import');
}
return $nodes;
}