@Inject
  public VertexiumUserRepository(
      Configuration configuration,
      SimpleOrmSession simpleOrmSession,
      AuthorizationRepository authorizationRepository,
      Graph graph,
      OntologyRepository ontologyRepository,
      UserSessionCounterRepository userSessionCounterRepository,
      WorkQueueRepository workQueueRepository,
      UserNotificationRepository userNotificationRepository,
      LockRepository lockRepository) {
    super(
        configuration,
        simpleOrmSession,
        userSessionCounterRepository,
        workQueueRepository,
        userNotificationRepository,
        lockRepository);
    this.authorizationRepository = authorizationRepository;
    this.graph = graph;

    authorizationRepository.addAuthorizationToGraph(VISIBILITY_STRING);
    authorizationRepository.addAuthorizationToGraph(VisalloVisibility.SUPER_USER_VISIBILITY_STRING);

    Concept userConcept =
        ontologyRepository.getOrCreateConcept(null, USER_CONCEPT_IRI, "visalloUser", null);
    userConceptId = userConcept.getIRI();

    Set<String> authorizationsSet = new HashSet<>();
    authorizationsSet.add(VISIBILITY_STRING);
    authorizationsSet.add(VisalloVisibility.SUPER_USER_VISIBILITY_STRING);
    this.authorizations = graph.createAuthorizations(authorizationsSet);
  }
  @Override
  @Traced
  public org.vertexium.Authorizations getAuthorizations(
      User user, String... additionalAuthorizations) {
    Set<String> userAuthorizations;
    if (user instanceof SystemUser) {
      userAuthorizations = new HashSet<>();
      userAuthorizations.add(VisalloVisibility.SUPER_USER_VISIBILITY_STRING);
    } else {
      Vertex userVertex = userVertexCache.getIfPresent(user.getUserId());
      if (userVertex != null) {
        userAuthorizations = getAuthorizations(userVertex);
      } else {
        userAuthorizations = null;
      }
    }
    if (userAuthorizations == null) {
      LOGGER.debug("BEGIN getAuthorizations query");
      Vertex userVertex = findByIdUserVertex(user.getUserId());
      userAuthorizations = getAuthorizations(userVertex);
      LOGGER.debug("END getAuthorizations query");
    }

    Set<String> authorizationsSet = new HashSet<>(userAuthorizations);
    Collections.addAll(authorizationsSet, additionalAuthorizations);
    return graph.createAuthorizations(authorizationsSet);
  }