mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-29 06:33:50 +00:00
Merge pull request #56 from overleaf/msm-downgrade-unauthorised-log-to-warning
Downgraded unathorised log to warning
This commit is contained in:
commit
4c49fd1191
2 changed files with 5 additions and 2 deletions
|
@ -22,7 +22,7 @@ module.exports = WebsocketController =
|
||||||
|
|
||||||
if !privilegeLevel or privilegeLevel == ""
|
if !privilegeLevel or privilegeLevel == ""
|
||||||
err = new Error("not authorized")
|
err = new Error("not authorized")
|
||||||
logger.error {err, project_id, user_id, client_id: client.id}, "user is not authorized to join project"
|
logger.warn {err, project_id, user_id, client_id: client.id}, "user is not authorized to join project"
|
||||||
return callback(err)
|
return callback(err)
|
||||||
|
|
||||||
client.join project_id
|
client.join project_id
|
||||||
|
|
|
@ -116,7 +116,10 @@ describe 'WebsocketController', ->
|
||||||
@callback
|
@callback
|
||||||
.calledWith(new Error("not authorized"))
|
.calledWith(new Error("not authorized"))
|
||||||
.should.equal true
|
.should.equal true
|
||||||
|
|
||||||
|
it "should not log an error", ->
|
||||||
|
@logger.error.called.should.equal false
|
||||||
|
|
||||||
describe "leaveProject", ->
|
describe "leaveProject", ->
|
||||||
beforeEach ->
|
beforeEach ->
|
||||||
@DocumentUpdaterManager.flushProjectToMongoAndDelete = sinon.stub().callsArg(1)
|
@DocumentUpdaterManager.flushProjectToMongoAndDelete = sinon.stub().callsArg(1)
|
||||||
|
|
Loading…
Reference in a new issue