Skip to content

Commit

Permalink
chronicleSuperUserPrincipals
Browse files Browse the repository at this point in the history
  • Loading branch information
UnsungHero97 committed Feb 16, 2022
1 parent 5f9fcb2 commit b86b64c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,15 @@ class V3StudyMigrationUpgrade(

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

val chronicleSuperUserSecurablePrincipal = principalService.getSecurablePrincipal("")
val chronicleSuperUserPrincipals = principalService.getAllPrincipals(chronicleSuperUserSecurablePrincipal).map { it.principal }.toSet()
logger.info("chronicle super user principals ${chronicleSuperUserPrincipals.size} $chronicleSuperUserPrincipals")

// get all participants for the study
val searchResult = searchService.executeEntityNeighborSearch(
orgStudyEntitySetIds,
PagedNeighborRequest(filter),
setOf(Principal(PrincipalType.USER, ""))
chronicleSuperUserPrincipals
).neighbors.getOrDefault(studyEkid, listOf())

if (searchResult.isNotEmpty()) {
Expand Down

0 comments on commit b86b64c

Please sign in to comment.