Check for permissions to access settings menu and added settings menu to sidebar menu

This commit is contained in:
Jan Böhmer 2025-07-06 22:29:35 +02:00
parent b9c3358f7f
commit 38c826713f
5 changed files with 31 additions and 14 deletions

View file

@ -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