Skip to content

Commit

Permalink
use Principals.getUserPrincipals
Browse files Browse the repository at this point in the history
  • Loading branch information
UnsungHero97 committed Feb 16, 2022
1 parent 7786b5b commit bc05df6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.openlattice.mechanic.upgrades
import com.geekbeast.rhizome.configuration.RhizomeConfiguration
import com.hazelcast.query.Predicates
import com.openlattice.authorization.AclKey
import com.openlattice.authorization.Principals
import com.openlattice.data.storage.MetadataOption
import com.openlattice.data.storage.postgres.PostgresEntityDataQueryService
import com.openlattice.edm.EdmConstants.Companion.LAST_WRITE_FQN
Expand Down Expand Up @@ -192,8 +193,7 @@ class V3StudyMigrationUpgrade(

private fun processParticipantsOfStudy(conn: Connection, orgId: UUID, studyEkid: UUID, orgStudyEntitySetIds: Set<UUID>, orgMaybeParticipantEntitySetIds: Set<UUID>) {

val chronicleSuperUserKey = AclKey(UUID.fromString("..."))
val chronicleSuperUserPrincipals = principalService.getAllUsersWithPrincipal(chronicleSuperUserKey).map { it.principal }.toSet()
val chronicleSuperUserPrincipals = Principals.getUserPrincipals("")
logger.info("Using chronicle super user principals $chronicleSuperUserPrincipals to execute neighbour search")

val filter = EntityNeighborsFilter(setOf(studyEkid), Optional.of(orgMaybeParticipantEntitySetIds), Optional.of(orgStudyEntitySetIds), Optional.empty())
Expand Down

0 comments on commit bc05df6

Please sign in to comment.