private function validateRoles(
        Sharing $constraint,
        SharingIdentityConfigInterface $config,
        array $roles
    ): void {
        if (!empty($roles) && !$config->isPermissible()) {
            $this->context->buildViolation($constraint->identityNotRoleableMessage)
                ->atPath($constraint->roles)
                ->setParameter('%class_property%', $constraint->identityClass)
                ->setParameter('%class%', $config->getType())
                ->addViolation()
            ;
        }
    }