From ce039f8cd39fb08eb2ff24f965e4c9d4529efa5b Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Thu, 11 Aug 2016 14:17:01 +0100 Subject: [PATCH] Remove the email when user id is added to project --- .../Features/Collaborators/CollaboratorsHandler.coffee | 5 ----- .../coffee/Collaborators/CollaboratorsHandlerTests.coffee | 2 -- 2 files changed, 7 deletions(-) diff --git a/services/web/app/coffee/Features/Collaborators/CollaboratorsHandler.coffee b/services/web/app/coffee/Features/Collaborators/CollaboratorsHandler.coffee index 822201a83e..e974698b18 100644 --- a/services/web/app/coffee/Features/Collaborators/CollaboratorsHandler.coffee +++ b/services/web/app/coffee/Features/Collaborators/CollaboratorsHandler.coffee @@ -130,11 +130,6 @@ module.exports = CollaboratorsHandler = else return callback(new Error("unknown privilegeLevel: #{privilegeLevel}")) - # Do these in the background - UserGetter.getUser user_id, {email: 1}, (error, user) -> - if error? - logger.error {err: error, project_id, user_id}, "error getting user while adding to project" - CollaboratorsEmailHandler.notifyUserOfProjectShare project_id, user.email ContactManager.addContact adding_user_id, user_id Project.update { _id: project_id }, { $addToSet: level }, (error) -> diff --git a/services/web/test/UnitTests/coffee/Collaborators/CollaboratorsHandlerTests.coffee b/services/web/test/UnitTests/coffee/Collaborators/CollaboratorsHandlerTests.coffee index efbf30487e..15c9d7a303 100644 --- a/services/web/test/UnitTests/coffee/Collaborators/CollaboratorsHandlerTests.coffee +++ b/services/web/test/UnitTests/coffee/Collaborators/CollaboratorsHandlerTests.coffee @@ -180,8 +180,6 @@ describe "CollaboratorsHandler", -> @Project.findOne = sinon.stub().callsArgWith(2, null, @project = {}) @ProjectEntityHandler.flushProjectToThirdPartyDataStore = sinon.stub().callsArg(1) @CollaboratorHandler.addEmailToProject = sinon.stub().callsArgWith(4, null, @user_id) - @UserGetter.getUser = sinon.stub().callsArgWith(2, null, @user = { _id: @user_id, email: @email }) - @CollaboratorsEmailHandler.notifyUserOfProjectShare = sinon.stub() @ContactManager.addContact = sinon.stub() describe "as readOnly", ->