public function isGranted($attributes, $object = null)
    {
        if (!$this->offsetExists('security.authorization_checker')) {
            return false;
        }
        
        $checker = $this['security.authorization_checker'];
        if ($checker instanceof AuthorizationCheckerInterface) {
            try {
                return $checker->isGranted($attributes, $object);
            } catch (AuthenticationCredentialsNotFoundException $e) {
                // authentication not found is considered not granted,
                // there is no need to throw an exception out in this case
                mdebug("Authentication credential not found, isGranted will return false. msg = %s", $e->getMessage());
                
                return false;
            }
        }
        else {
            return false;
        }
    }