private function validateRolePermissions(RoleSecurityIdentity $sid, array $permissions, $subject = null, $class = null, $field = null)
    {
        $configOperations = $this->getConfigPermissionOperations($class, $field);

        foreach ($configOperations as $configOperation) {
            if (!isset($permissions[$configOperation])) {
                if (null !== $sp = $this->getConfigPermission($sid, $configOperation, $subject, $class, $field)) {
                    $permissions[$sp->getPermission()->getOperation()] = $sp;

                    continue;
                }

                throw new PermissionNotFoundException($configOperation, $class, $field);
            }
        }

        return array_values($permissions);
    }