mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-10 21:19:30 +00:00
Check for permissions to access settings menu and added settings menu to sidebar menu
This commit is contained in:
parent
b9c3358f7f
commit
38c826713f
5 changed files with 31 additions and 14 deletions
|
|
@ -40,6 +40,8 @@ class SettingsController extends AbstractController
|
|||
#[Route("/settings", name: "system_settings")]
|
||||
public function systemSettings(Request $request, TagAwareCacheInterface $cache): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('@config.change_system_settings');
|
||||
|
||||
//Create a clone of the settings object
|
||||
$settings = $this->settingsManager->createTemporaryCopy(AppSettings::class);
|
||||
|
||||
|
|
@ -62,9 +64,6 @@ class SettingsController extends AbstractController
|
|||
$cache->invalidateTags(['tree_treeview', 'sidebar_tree_update']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//Render the form
|
||||
return $this->render('settings/settings.html.twig', [
|
||||
'form' => $form
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue