mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-28 22:41:02 +00:00
remove unused call to UserGetter.getUser
This commit is contained in:
parent
14b77a2060
commit
0051e59309
2 changed files with 11 additions and 18 deletions
|
@ -40,8 +40,6 @@ module.exports = EditorHttpController =
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
return callback(new Error("not found")) if !project?
|
return callback(new Error("not found")) if !project?
|
||||||
CollaboratorsHandler.getInvitedMembersWithPrivilegeLevels project_id, (error, members) ->
|
CollaboratorsHandler.getInvitedMembersWithPrivilegeLevels project_id, (error, members) ->
|
||||||
return callback(error) if error?
|
|
||||||
UserGetter.getUser user_id, { isAdmin: true }, (error, user) ->
|
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
token = TokenAccessHandler.getRequestToken(req, project_id)
|
token = TokenAccessHandler.getRequestToken(req, project_id)
|
||||||
AuthorizationManager.getPrivilegeLevelForProject user_id, project_id, token, (error, privilegeLevel) ->
|
AuthorizationManager.getPrivilegeLevelForProject user_id, project_id, token, (error, privilegeLevel) ->
|
||||||
|
|
|
@ -137,11 +137,6 @@ describe "EditorHttpController", ->
|
||||||
.calledWith(@project_id)
|
.calledWith(@project_id)
|
||||||
.should.equal true
|
.should.equal true
|
||||||
|
|
||||||
it "should look up the user", ->
|
|
||||||
@UserGetter.getUser
|
|
||||||
.calledWith(@user_id, { isAdmin: true })
|
|
||||||
.should.equal true
|
|
||||||
|
|
||||||
it "should check the privilege level", ->
|
it "should check the privilege level", ->
|
||||||
@AuthorizationManager.getPrivilegeLevelForProject
|
@AuthorizationManager.getPrivilegeLevelForProject
|
||||||
.calledWith(@user_id, @project_id, @token)
|
.calledWith(@user_id, @project_id, @token)
|
||||||
|
|
Loading…
Reference in a new issue