private function validateSubject(Sharing $constraint, $subjectClass): void
    {
        $res = $this->validateClass($constraint, $subjectClass, $constraint->subjectClass);

        if ($res && !$this->sharingManager->hasSharingVisibility(SubjectIdentity::fromClassname($subjectClass))) {
            $this->context->buildViolation($constraint->classNotManagedMessage)
                ->atPath($constraint->subjectClass)
                ->setParameter('%class_property%', $constraint->subjectClass)
                ->setParameter('%class%', $subjectClass)
                ->addViolation()
            ;
        }
    }