User user = getUser(request);
String workspaceId = getActiveWorkspaceId(request);
Workspace workspace = workspaceRepository.findById(workspaceId, user);
Authorizations authorizations = getAuthorizations(request, user);
VisibilityJson visibilityJson = GraphUtil.updateVisibilitySourceAndAddWorkspaceId(null, visibilitySource, workspaceId);
LumifyVisibility visibility = this.visibilityTranslator.toVisibility(visibilityJson);
if (!graph.isVisibilityValid(visibility.getVisibility(), authorizations)) {
LOGGER.warn("%s is not a valid visibility for %s user", visibilitySource, user.getDisplayName());