@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);
  }
예제 #2
0
 private void setupGraphAuthorizations() {
   LOGGER.debug("setupGraphAuthorizations");
   AuthorizationRepository authorizationRepository =
       InjectHelper.getInstance(AuthorizationRepository.class);
   authorizationRepository.addAuthorizationToGraph(
       VisalloVisibility.SUPER_USER_VISIBILITY_STRING,
       UserRepository.VISIBILITY_STRING,
       TermMentionRepository.VISIBILITY_STRING,
       LongRunningProcessRepository.VISIBILITY_STRING,
       OntologyRepository.VISIBILITY_STRING,
       WorkspaceRepository.VISIBILITY_STRING,
       VideoFrameInfo.VISIBILITY_STRING);
 }