File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
thehive/app/org/thp/thehive/services Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
package org .thp .thehive .services
2
2
3
3
import akka .actor .typed .ActorRef
4
- import org .apache .tinkerpop .gremlin .process .traversal .Order
4
+ import org .apache .tinkerpop .gremlin .process .traversal .{ Order , P }
5
5
import org .apache .tinkerpop .gremlin .structure .Vertex
6
6
import org .thp .scalligraph .auth .{AuthContext , AuthContextImpl , Permission }
7
7
import org .thp .scalligraph .controllers .FFile
@@ -353,7 +353,13 @@ class UserIntegrityCheck @Inject() (
353
353
(_.out(" UserRole" ), _.in(" UserRole" )),
354
354
(_.out(" RoleOrganisation" ), _.in(" RoleOrganisation" ))
355
355
).flatMap(ElementSelector .firstCreatedElement(_)).map(e => removeVertices(e._2)).size
356
- val orphanCount = service.startTraversal.filterNot(_.organisations).sideEffect(_.drop()).getCount
356
+ val orphanCount =
357
+ service
358
+ .startTraversal
359
+ .has(_.login, P .without(User .initialValues.map(_.login): _* ))
360
+ .filterNot(_.organisations)
361
+ .sideEffect(_.drop())
362
+ .getCount
357
363
Map (" duplicateRoleLinks" -> duplicateRoleLinks.toLong, " orphan" -> orphanCount)
358
364
}
359
365
}
You can’t perform that action at this time.
0 commit comments