mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-23 18:28:49 +02:00
Hide trees in sidebar, if user does not have permission to show them (and protect the JSON endpoints)
This commit is contained in:
parent
10a035fcea
commit
d0f7949bc9
5 changed files with 52 additions and 21 deletions
|
@ -247,7 +247,7 @@ class ToolsTreeBuilder
|
|||
$this->urlGenerator->generate('parts_show_all')
|
||||
))->setIcon('fa-fw fa-treeview fa-solid fa-globe');
|
||||
|
||||
if ($this->security->isGranted('read', new PartAttachment())) {
|
||||
if ($this->security->isGranted('@attachments.list_attachments')) {
|
||||
$show_nodes[] = (new TreeViewNode(
|
||||
$this->translator->trans('tree.tools.show.all_attachments'),
|
||||
$this->urlGenerator->generate('attachment_list')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue