From 39abccb35d6589ec26d6061f8aa6677ad7d8f2af Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Wed, 24 Jul 2019 14:47:07 +0200 Subject: [PATCH] dashboard is missing in initial view (#974) --- src/Form/Type/InitialViewType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Form/Type/InitialViewType.php b/src/Form/Type/InitialViewType.php index 9bf342e9..cfc3cc6e 100644 --- a/src/Form/Type/InitialViewType.php +++ b/src/Form/Type/InitialViewType.php @@ -35,7 +35,7 @@ class InitialViewType extends AbstractType ]; protected const ROUTE_PERMISSION = [ - 'dashboard' => 'menu.homepage', + 'dashboard' => '', 'timesheet' => 'view_own_timesheet', 'calendar' => 'view_own_timesheet', 'my_profile' => 'view_own_profile', @@ -67,7 +67,7 @@ class InitialViewType extends AbstractType { $choices = []; foreach (self::ROUTE_PERMISSION as $route => $permission) { - if ($this->voter->isGranted($permission)) { + if (empty($permission) || $this->voter->isGranted($permission)) { $name = self::ALLOWED_VIEWS[$route]; $choices[$name] = $route; }