protected function checkSecurity($intention, $resource = null)
    {
        $securityMapping = $this->getSecurityMapping();

        return $this->container->get('security.authorization_checker')->isGranted(
            (array) (empty($securityMapping[$intention]) ?
                $intention :
                $securityMapping[$intention]
            ),
            $resource
        );
    }