From 8859768e47d4349ab55aed3a9fc20650f1597940 Mon Sep 17 00:00:00 2001 From: To-om Date: Fri, 26 Jun 2020 14:57:01 +0200 Subject: [PATCH] #1410 Rename case user to assignee --- ScalliGraph | 2 +- dto/src/main/scala/org/thp/thehive/dto/v1/Case.scala | 2 +- thehive/app/org/thp/thehive/controllers/v1/Properties.scala | 2 +- thehive/test/org/thp/thehive/controllers/v1/CaseCtrlTest.scala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ScalliGraph b/ScalliGraph index d1acabab22..61a524f400 160000 --- a/ScalliGraph +++ b/ScalliGraph @@ -1 +1 @@ -Subproject commit d1acabab220ee70ada73c5683f3050671a85c208 +Subproject commit 61a524f400ce5c3f760941ffbe140cd5e5556492 diff --git a/dto/src/main/scala/org/thp/thehive/dto/v1/Case.scala b/dto/src/main/scala/org/thp/thehive/dto/v1/Case.scala index 335b1019e2..932f5c7bd4 100644 --- a/dto/src/main/scala/org/thp/thehive/dto/v1/Case.scala +++ b/dto/src/main/scala/org/thp/thehive/dto/v1/Case.scala @@ -45,7 +45,7 @@ case class OutputCase( pap: Int, status: String, summary: Option[String] = None, - user: Option[String], + assignee: Option[String], customFields: Set[OutputCustomFieldValue] = Set.empty ) diff --git a/thehive/app/org/thp/thehive/controllers/v1/Properties.scala b/thehive/app/org/thp/thehive/controllers/v1/Properties.scala index 02511c2753..c5ec9cf782 100644 --- a/thehive/app/org/thp/thehive/controllers/v1/Properties.scala +++ b/thehive/app/org/thp/thehive/controllers/v1/Properties.scala @@ -126,7 +126,7 @@ class Properties @Inject() ( .property("pap", UniMapping.int)(_.field.updatable) .property("status", UniMapping.string)(_.field.updatable) .property("summary", UniMapping.string.optional)(_.field.updatable) - .property("user", UniMapping.string.optional)(_.select(_.user.login).custom { (_, login, vertex, _, graph, authContext) => + .property("assignee", UniMapping.string.optional)(_.select(_.user.login).custom { (_, login, vertex, _, graph, authContext) => for { c <- caseSrv.get(vertex)(graph).getOrFail("Case") user <- login.map(userSrv.get(_)(graph).getOrFail("User")).flip diff --git a/thehive/test/org/thp/thehive/controllers/v1/CaseCtrlTest.scala b/thehive/test/org/thp/thehive/controllers/v1/CaseCtrlTest.scala index 695adaf854..ec636990cc 100644 --- a/thehive/test/org/thp/thehive/controllers/v1/CaseCtrlTest.scala +++ b/thehive/test/org/thp/thehive/controllers/v1/CaseCtrlTest.scala @@ -38,7 +38,7 @@ object TestCase { outputCase.pap, outputCase.status, outputCase.summary, - outputCase.user, + outputCase.assignee, outputCase.customFields ) }