mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-27 11:01:56 +02:00
Remove the email when user id is added to project
This commit is contained in:
@@ -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) ->
|
||||
|
||||
@@ -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", ->
|
||||
|
||||
Reference in New Issue
Block a user