Skip to content

Commit

Permalink
#1752 Fix case visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jan 28, 2021
1 parent 656b645 commit 172a5d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thehive/app/org/thp/thehive/services/PatternSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class PatternSrv @Inject() (
override def getByName(name: String)(implicit graph: Graph): Traversal.V[Pattern] =
Try(startTraversal.getByPatternId(name)).getOrElse(startTraversal.limit(0))

def getCasePatterns(caseId: String)(implicit graph: Graph): Try[Seq[String]] =
def getCasePatterns(caseId: String)(implicit authContext: AuthContext, graph: Graph): Try[Seq[String]] =
for {
caze <- caseSrv.get(EntityIdOrName(caseId)).getOrFail("Case")
caze <- caseSrv.get(EntityIdOrName(caseId)).visible(organisationSrv).getOrFail("Case")
patterns = caseSrv.get(caze).procedure.pattern.richPattern.toSeq
} yield patterns.map(_.patternId)

Expand Down

0 comments on commit 172a5d3

Please sign in to comment.