Skip to content

Commit

Permalink
#1691 Fix getObservable query to manage observables from alert
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Nov 26, 2020
1 parent a3b5165 commit f37e7ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion thehive/app/org/thp/thehive/services/ObservableSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f37e7ef

Please sign in to comment.