diff --git a/src/main/kotlin/com/openlattice/mechanic/upgrades/V3StudyMigrationUpgrade.kt b/src/main/kotlin/com/openlattice/mechanic/upgrades/V3StudyMigrationUpgrade.kt index 63940cb8..06837e3c 100644 --- a/src/main/kotlin/com/openlattice/mechanic/upgrades/V3StudyMigrationUpgrade.kt +++ b/src/main/kotlin/com/openlattice/mechanic/upgrades/V3StudyMigrationUpgrade.kt @@ -3,6 +3,8 @@ 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.Principal +import com.openlattice.authorization.PrincipalType import com.openlattice.authorization.Principals import com.openlattice.data.storage.MetadataOption import com.openlattice.data.storage.postgres.PostgresEntityDataQueryService @@ -193,16 +195,13 @@ class V3StudyMigrationUpgrade( private fun processParticipantsOfStudy(conn: Connection, orgId: UUID, studyEkid: UUID, orgStudyEntitySetIds: Set, orgMaybeParticipantEntitySetIds: Set) { - 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()) // get all participants for the study val searchResult = searchService.executeEntityNeighborSearch( orgStudyEntitySetIds, PagedNeighborRequest(filter), - chronicleSuperUserPrincipals + setOf(Principal(PrincipalType.USER, "")) ).neighbors.getOrDefault(studyEkid, listOf()) if (searchResult.isNotEmpty()) {