Skip to content

Commit 3578a49

Browse files
committed
#2305 Cleanup
1 parent 2d4328d commit 3578a49

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

thehive/app/org/thp/thehive/controllers/v1/UserCtrl.scala

-15
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,6 @@ class UserCtrl @Inject() (
7676
}
7777
}
7878
)
79-
//
80-
// authContext
81-
// }))(org => userSteps.richUser(authContext, EntityIdOrName(org)))
82-
// .page(params.from, params.to, params.extraData.contains("total"), limitedCountThreshold)
83-
// )
84-
// override def pageQuery(limitedCountThreshold: Long): ParamQuery[OutputParam] =
85-
// Query.withParam[OutputParam, Traversal.V[Case], IteratorOutput](
86-
// "page",
87-
// {
88-
// case (OutputParam(from, to, extraData), caseSteps, authContext) =>
89-
// caseSteps.richPage(from, to, extraData.contains("total"), limitedCountThreshold) {
90-
// _.richCaseWithCustomRenderer(caseStatsRenderer(extraData - "total")(authContext))(authContext)
91-
// }
92-
// }
93-
// )
9479

9580
override val outputQuery: Query =
9681
Query.outputWithContext[RichUser, Traversal.V[User]]((userSteps, authContext) => userSteps.richUser(authContext))

thehive/app/org/thp/thehive/services/TagSrv.scala

+6-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ class TagIntegrityCheckOps @Inject() (val db: Database, val service: TagSrv) ext
189189

190190
override def globalCheck(): Map[String, Int] =
191191
service
192-
.pagedTraversalIds(db, 100, _.filterNot(_.or(_.alert, _.observable, _.`case`, _.caseTemplate, _.taxonomy))) { ids =>
192+
.pagedTraversalIds(
193+
db,
194+
100,
195+
_.filter(_.taxonomy.has(_.namespace, TextP.startingWith("_freetags_")))
196+
.filterNot(_.or(_.alert, _.observable, _.`case`, _.caseTemplate, _.taxonomy))
197+
) { ids =>
193198
db.tryTransaction { implicit graph =>
194199
Try {
195200
val orphans = service

0 commit comments

Comments
 (0)