bundle/Controller/LayoutsController.php
protected function checkPermissions()
    {
        if ($this->isGranted('ROLE_NGBM_EDITOR')) {
            return;
        }

        if ($this->isGranted('nglayouts:ui:access')) {
            return;
        }

        $exception = $this->createAccessDeniedException();
        $exception->setAttributes('nglayouts:ui:access');

        throw $exception;
    }
protected function checkPermissions()
    {
        if ($this->isGranted('ROLE_NGBM_EDITOR')) {
            return;
        }

        if ($this->isGranted('nglayouts:ui:access')) {
            return;
        }

        $exception = $this->createAccessDeniedException();
        $exception->setAttributes('nglayouts:ui:access');

        throw $exception;
    }
Performs access checks on the controller.