From 32b7e22de6152622a1e9c5e6877fc665ed3d4aaa Mon Sep 17 00:00:00 2001 From: To-om Date: Thu, 26 Nov 2020 11:48:05 +0100 Subject: [PATCH] #1691 Fix getObservable query to manage observables from alert --- thehive/app/org/thp/thehive/services/ObservableSrv.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/thehive/app/org/thp/thehive/services/ObservableSrv.scala b/thehive/app/org/thp/thehive/services/ObservableSrv.scala index dc47f08504..b95f40f7aa 100644 --- a/thehive/app/org/thp/thehive/services/ObservableSrv.scala +++ b/thehive/app/org/thp/thehive/services/ObservableSrv.scala @@ -235,7 +235,8 @@ object ObservableOps { .profile .domainMap(profile => profile.permissions & authContext.permissions) - def organisations: Traversal.V[Organisation] = traversal.in[ShareObservable].in[OrganisationShare].v[Organisation] + def organisations: Traversal.V[Organisation] = + traversal.coalesceIdent(_.in[ShareObservable].in[OrganisationShare], _.in[AlertObservable].out[AlertOrganisation]).v[Organisation] def origin: Traversal.V[Organisation] = shares.has(_.owner, true).organisation