From 69b951d399559278f950630d5009d94123a627ad Mon Sep 17 00:00:00 2001 From: To-om Date: Fri, 22 Jan 2021 18:22:54 +0100 Subject: [PATCH] #1759 Fix user deduplication checks --- thehive/app/org/thp/thehive/services/UserSrv.scala | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/thehive/app/org/thp/thehive/services/UserSrv.scala b/thehive/app/org/thp/thehive/services/UserSrv.scala index b236698813..6cfff5b823 100644 --- a/thehive/app/org/thp/thehive/services/UserSrv.scala +++ b/thehive/app/org/thp/thehive/services/UserSrv.scala @@ -41,11 +41,6 @@ class UserSrv @Inject() ( val userAttachmentSrv = new EdgeSrv[UserAttachment, User, Attachment] - override def createEntity(e: User)(implicit graph: Graph, authContext: AuthContext): Try[User with Entity] = { - integrityCheckActor ! EntityAdded("User") - super.createEntity(e) - } - def checkUser(user: User): Try[User] = { val login = if (!user.login.contains('@') && defaultUserDomain.isDefined) s"${user.login}@${defaultUserDomain.get}".toLowerCase @@ -64,6 +59,7 @@ class UserSrv @Inject() ( roleSrv.create(user, organisation, profile) else Success(())).flatMap { _ => + integrityCheckActor ! EntityAdded("User") for { richUser <- get(user).richUser(authContext, organisation._id).getOrFail("User") _ <- auditSrv.user.create(user, richUser.toJson)