mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
kill off CollaboratorsHandler. changeUsersPrivilegeLevel as it is not used anywhere
This commit is contained in:
parent
e454d2f059
commit
43c4531e51
2 changed files with 0 additions and 18 deletions
|
@ -19,11 +19,6 @@ module.exports =
|
|||
logger.err err: err, "problem removing user from project collaberators"
|
||||
callback(err)
|
||||
|
||||
changeUsersPrivilegeLevel: (project_id, user_id, newPrivalageLevel, callback = ->)->
|
||||
@removeUserFromProject project_id, user_id, =>
|
||||
User.findById user_id, (err, user)=>
|
||||
@addUserToProject project_id, user_id, newPrivalageLevel, callback
|
||||
|
||||
addUserToProject: (project_id, email, privilegeLevel, callback)->
|
||||
emails = mimelib.parseAddresses(email)
|
||||
email = emails[0]?.address?.toLowerCase()
|
||||
|
|
|
@ -31,19 +31,6 @@ describe "CollaboratorsHandler", ->
|
|||
@project_id = "123l2j13lkj"
|
||||
@user_id = "132kj1lk2j"
|
||||
|
||||
describe "changeUsersPrivilegeLevel", ->
|
||||
|
||||
|
||||
it "should call removeUserFromProject then addUserToProject", (done)->
|
||||
@CollaboratorHandler.removeUserFromProject = sinon.stub().callsArgWith(2)
|
||||
@CollaboratorHandler.addUserToProject = sinon.stub().callsArgWith(3)
|
||||
newPrivalageLevel = "readAndWrite"
|
||||
@CollaboratorHandler.changeUsersPrivilegeLevel @project_id, @user_id, newPrivalageLevel, =>
|
||||
@CollaboratorHandler.removeUserFromProject.calledWith(@project_id, @user_id).should.equal true
|
||||
@CollaboratorHandler.addUserToProject.calledWith(@project_id, @user_id, newPrivalageLevel)
|
||||
done()
|
||||
|
||||
|
||||
describe "removeUserFromProject", ->
|
||||
|
||||
beforeEach ->
|
||||
|
|
Loading…
Reference in a new issue