private function isConfigGranted(RoleSecurityIdentity $sid, $operation, $subject = null, $class = null)
    {
        $granted = true;

        if (null !== $class && $this->hasConfig($class)) {
            $config = $this->getConfig($class);

            if (null !== $config->getMaster()) {
                $realOperation = $config->getMappingPermission($operation);
                $granted = $this->isGranted([$sid], [$realOperation], $subject);
            }
        }

        return $granted;
    }