Skip to content

Commit

Permalink
#2305 Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Jan 24, 2022
1 parent 2d4328d commit 3578a49
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ScalliGraph
15 changes: 0 additions & 15 deletions thehive/app/org/thp/thehive/controllers/v1/UserCtrl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,6 @@ class UserCtrl @Inject() (
}
}
)
//
// authContext
// }))(org => userSteps.richUser(authContext, EntityIdOrName(org)))
// .page(params.from, params.to, params.extraData.contains("total"), limitedCountThreshold)
// )
// override def pageQuery(limitedCountThreshold: Long): ParamQuery[OutputParam] =
// Query.withParam[OutputParam, Traversal.V[Case], IteratorOutput](
// "page",
// {
// case (OutputParam(from, to, extraData), caseSteps, authContext) =>
// caseSteps.richPage(from, to, extraData.contains("total"), limitedCountThreshold) {
// _.richCaseWithCustomRenderer(caseStatsRenderer(extraData - "total")(authContext))(authContext)
// }
// }
// )

override val outputQuery: Query =
Query.outputWithContext[RichUser, Traversal.V[User]]((userSteps, authContext) => userSteps.richUser(authContext))
Expand Down
7 changes: 6 additions & 1 deletion thehive/app/org/thp/thehive/services/TagSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,12 @@ class TagIntegrityCheckOps @Inject() (val db: Database, val service: TagSrv) ext

override def globalCheck(): Map[String, Int] =
service
.pagedTraversalIds(db, 100, _.filterNot(_.or(_.alert, _.observable, _.`case`, _.caseTemplate, _.taxonomy))) { ids =>
.pagedTraversalIds(
db,
100,
_.filter(_.taxonomy.has(_.namespace, TextP.startingWith("_freetags_")))
.filterNot(_.or(_.alert, _.observable, _.`case`, _.caseTemplate, _.taxonomy))
) { ids =>
db.tryTransaction { implicit graph =>
Try {
val orphans = service
Expand Down

0 comments on commit 3578a49

Please sign in to comment.