From df919675c4e07bc3e63b407f2ead785a3ad9a8d2 Mon Sep 17 00:00:00 2001 From: To-om Date: Thu, 29 Oct 2020 12:34:18 +0100 Subject: [PATCH] #1599 Make custom fields type updatable --- .../app/org/thp/thehive/controllers/v0/CustomFieldCtrl.scala | 2 +- .../app/org/thp/thehive/controllers/v1/CustomFieldCtrl.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/thehive/app/org/thp/thehive/controllers/v0/CustomFieldCtrl.scala b/thehive/app/org/thp/thehive/controllers/v0/CustomFieldCtrl.scala index fd9ae73206..d4293f404d 100644 --- a/thehive/app/org/thp/thehive/controllers/v0/CustomFieldCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v0/CustomFieldCtrl.scala @@ -110,7 +110,7 @@ class PublicCustomField @Inject() (customFieldSrv: CustomFieldSrv) extends Publi .property("description", UMapping.string)(_.field.updatable) .property("reference", UMapping.string)(_.rename("name").readonly) .property("mandatory", UMapping.boolean)(_.field.updatable) - .property("type", UMapping.string)(_.field.readonly) + .property("type", UMapping.string)(_.field.updatable) .property("options", UMapping.json.sequence)(_.field.updatable) .build } diff --git a/thehive/app/org/thp/thehive/controllers/v1/CustomFieldCtrl.scala b/thehive/app/org/thp/thehive/controllers/v1/CustomFieldCtrl.scala index 3acbb91a62..1e5c47e94a 100644 --- a/thehive/app/org/thp/thehive/controllers/v1/CustomFieldCtrl.scala +++ b/thehive/app/org/thp/thehive/controllers/v1/CustomFieldCtrl.scala @@ -39,7 +39,7 @@ class CustomFieldCtrl @Inject() (entrypoint: Entrypoint, @Named("with-thehive-sc .property("description", UMapping.string)(_.field.updatable) .property("reference", UMapping.string)(_.rename("name").readonly) .property("mandatory", UMapping.boolean)(_.field.updatable) - .property("type", UMapping.string)(_.field.readonly) + .property("type", UMapping.string)(_.field.updatable) .property("options", UMapping.json.sequence)(_.field.updatable) .build