From 99e7cf316094cd0acb7954c3d9ce1fb36f2b92cb Mon Sep 17 00:00:00 2001 From: To-om Date: Thu, 8 Apr 2021 15:55:43 +0200 Subject: [PATCH] #1946 Deduplicate global user list --- .../app/org/thp/thehive/controllers/v0/OrganisationCtrl.scala | 2 +- .../app/org/thp/thehive/controllers/v1/OrganisationCtrl.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/thehive/app/org/thp/thehive/controllers/v0/OrganisationCtrl.scala b/thehive/app/org/thp/thehive/controllers/v0/OrganisationCtrl.scala index 75da26efd7..3ddfa951f2 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/OrganisationCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/OrganisationCtrl.scala @@ -142,7 +142,7 @@ class PublicOrganisation @Inject() (organisationSrv: OrganisationSrv) extends Pu ) override val extraQueries: Seq[ParamQuery[_]] = Seq( Query[Traversal.V[Organisation], Traversal.V[Organisation]]("visible", (organisationSteps, _) => organisationSteps.visibleOrganisationsFrom), - Query[Traversal.V[Organisation], Traversal.V[User]]("users", (organisationSteps, _) => organisationSteps.users), + Query[Traversal.V[Organisation], Traversal.V[User]]("users", (organisationSteps, _) => organisationSteps.users.dedup), Query[Traversal.V[Organisation], Traversal.V[CaseTemplate]]("caseTemplates", (organisationSteps, _) => organisationSteps.caseTemplates) ) override val publicProperties: PublicProperties = PublicPropertyListBuilder[Organisation] diff --git a/thehive/app/org/thp/thehive/controllers/v1/OrganisationCtrl.scala b/thehive/app/org/thp/thehive/controllers/v1/OrganisationCtrl.scala index f4f5f70f2d..131402b763 100644 --- a/thehive/app/org/thp/thehive/controllers/v1/OrganisationCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v1/OrganisationCtrl.scala @@ -46,7 +46,7 @@ class OrganisationCtrl @Inject() ( ) override val extraQueries: Seq[ParamQuery[_]] = Seq( Query[Traversal.V[Organisation], Traversal.V[Organisation]]("visible", (organisationSteps, _) => organisationSteps.visibleOrganisationsFrom), - Query[Traversal.V[Organisation], Traversal.V[User]]("users", (organisationSteps, _) => organisationSteps.users), + Query[Traversal.V[Organisation], Traversal.V[User]]("users", (organisationSteps, _) => organisationSteps.users.dedup), Query[Traversal.V[Organisation], Traversal.V[CaseTemplate]]("caseTemplates", (organisationSteps, _) => organisationSteps.caseTemplates), Query[Traversal.V[Organisation], Traversal.V[Alert]]("alerts", (organisationSteps, _) => organisationSteps.alerts) )