From 7411e642d928e2667c00d284abb9d3051ffbf302 Mon Sep 17 00:00:00 2001 From: To-om Date: Mon, 1 Mar 2021 16:25:28 +0100 Subject: [PATCH] #1731 Fix taxonomy filter --- thehive/app/org/thp/thehive/services/TagSrv.scala | 7 +------ thehive/app/org/thp/thehive/services/TaxonomySrv.scala | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/thehive/app/org/thp/thehive/services/TagSrv.scala b/thehive/app/org/thp/thehive/services/TagSrv.scala index d6eac6b71a..9d80e0b5e8 100644 --- a/thehive/app/org/thp/thehive/services/TagSrv.scala +++ b/thehive/app/org/thp/thehive/services/TagSrv.scala @@ -30,13 +30,8 @@ class TagSrv @Inject() ( def freeTagColour: String = freeTagColourConfig.get - private val defaultColourConfig: ConfigItem[String, String] = - appConfig.item[String]("tags.defaultColour", "Default colour of the automatically created tags") - - def defaultColour: String = defaultColourConfig.get - private def freeTag(tagName: String)(implicit graph: Graph, authContext: AuthContext): Tag = - Tag(freeTagNamespace, tagName, None, None, defaultColour) + Tag(freeTagNamespace, tagName, None, None, freeTagColour) private def freeTagNamespace(implicit graph: Graph, authContext: AuthContext): String = s"_freetags_${organisationSrv.currentId(graph, authContext).value}" diff --git a/thehive/app/org/thp/thehive/services/TaxonomySrv.scala b/thehive/app/org/thp/thehive/services/TaxonomySrv.scala index 0cc0d2f354..eb70205e22 100644 --- a/thehive/app/org/thp/thehive/services/TaxonomySrv.scala +++ b/thehive/app/org/thp/thehive/services/TaxonomySrv.scala @@ -106,7 +106,7 @@ object TaxonomyOps { noFreetags.filter(_.organisations.get(authContext.organisation)) def noFreetags: Traversal.V[Taxonomy] = - traversal.has(_.namespace, TextP.notStartingWith("_freetags")) + traversal.hasNot(_.namespace, TextP.startingWith("_freetags")) def freetags: Traversal.V[Taxonomy] = traversal.has(_.namespace, TextP.startingWith("_freetags"))