mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-16 13:24:31 +02:00
[ReelCalculator] Added permission and added it to tools menu.
This commit is contained in:
parent
21f0727509
commit
36dfae52f2
6 changed files with 37 additions and 10 deletions
|
@ -21,6 +21,8 @@ class ToolsController extends AbstractController
|
|||
*/
|
||||
public function reelCalculator() : Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('@tools.reel_calculator');
|
||||
|
||||
return $this->render("Tools/ReelCalculator/main.html.twig");
|
||||
}
|
||||
}
|
|
@ -82,7 +82,7 @@ class GroupFixtures extends Fixture
|
|||
'suppliers' => 5461,
|
||||
'manufacturers' => 5461,
|
||||
'attachment_types' => 1365,
|
||||
'tools' => 87381,
|
||||
'tools' => 349525,
|
||||
'labels' => 87381,
|
||||
'parts_category' => 5,
|
||||
'parts_minamount' => 5,
|
||||
|
|
|
@ -132,6 +132,13 @@ class ToolsTreeBuilder
|
|||
);
|
||||
}
|
||||
|
||||
if ($this->security->isGranted('@tools.reel_calculator')) {
|
||||
$nodes[] = new TreeViewNode(
|
||||
$this->translator->trans('tree.tools.tools.reel_calculator'),
|
||||
$this->urlGenerator->generate('tools_reel_calculator')
|
||||
);
|
||||
}
|
||||
|
||||
return $nodes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue