Remove the email when user id is added to project

This commit is contained in:
Shane Kilkelly 2016-08-11 14:17:01 +01:00
parent 826295167f
commit ce039f8cd3
2 changed files with 0 additions and 7 deletions

View file

@ -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) ->

View file

@ -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", ->