From 711c0d491a0177ec42ce5c7bcb79b109577d088e Mon Sep 17 00:00:00 2001 From: To-om Date: Tue, 5 Apr 2022 09:25:00 +0200 Subject: [PATCH] #2366 Update organisatIds when the share is removed --- thehive/app/org/thp/thehive/controllers/v1/ShareCtrl.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thehive/app/org/thp/thehive/controllers/v1/ShareCtrl.scala b/thehive/app/org/thp/thehive/controllers/v1/ShareCtrl.scala index 80e54c98c1..3e691b4086 100644 --- a/thehive/app/org/thp/thehive/controllers/v1/ShareCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v1/ShareCtrl.scala @@ -167,7 +167,7 @@ class ShareCtrl @Inject() ( else if (shareSrv.get(shareId).has(_.owner, true).exists) Failure(AuthorizationError("You can't remove initial shares")) else - shareSrv.get(shareId).getOrFail("Share").flatMap(shareSrv.delete(_)) + shareSrv.unshareCase(shareId) def updateShare(shareId: String): Action[AnyContent] = entrypoint("update share")