private function checkForCyclicHierarchy($parentRoleId, $childRoleId)
    {
        $result = $this->repositoryRegistry
            ->getRoleHierarchyRepository()
            ->hasChildRoleId($parentRoleId, $childRoleId);

        if ($result === true) {
            throw new CyclicException('There detected cyclic line. Role with id = ' . $parentRoleId . ' has child role whit id =' . $childRoleId);
        }
    }