Просмотр исходного кода

Remove the email when user id is added to project

Shane Kilkelly 10 лет назад
Родитель
Сommit
ce039f8cd3

+ 0 - 5
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) ->

+ 0 - 2
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", ->