feat: gate functionality for customer expert users
This commit is contained in:
1 parent
1d14f00bb7
commit
a1d1fdde14
15 files changed
+55
-43
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Menu;
|
||||
|
||||
use App\Security\Voter\AdministrativeAccessVoter;
|
||||
use Knp\Menu\FactoryInterface;
|
||||
use Knp\Menu\ItemInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
@@ -39,7 +40,7 @@ abstract class AbstractMenuBuilder
|
||||
|
||||
protected function addAdminItem(ItemInterface $menu): void
|
||||
{
|
||||
if ($this->security->isGranted('ROLE_ADMIN')) {
|
||||
if ($this->security->isGranted(AdministrativeAccessVoter::ADMINISTRATIVE_ACCESS)) {
|
||||
$this->addDivider($menu);
|
||||
$menu->addChild('zum Adminbereich', [
|
||||
'route' => 'app_admin_index',
|
||||
|
||||
Reference in new issue
Block a user