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 Dec 11, 2020
1 parent 1fc5261 commit 32b7e22
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 32b7e22

Please sign in to comment.