Downgraded unathorised log to warning

This commit is contained in:
miguel 2019-06-21 07:30:12 +02:00
parent a579a83389
commit 46dfe56b05
2 changed files with 5 additions and 2 deletions

View file

@ -22,7 +22,7 @@ module.exports = WebsocketController =
if !privilegeLevel or privilegeLevel == ""
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)
client.join project_id

View file

@ -117,6 +117,9 @@ describe 'WebsocketController', ->
.calledWith(new Error("not authorized"))
.should.equal true
it "should not log an error", ->
@logger.error.called.should.equal false
describe "leaveProject", ->
beforeEach ->
@DocumentUpdaterManager.flushProjectToMongoAndDelete = sinon.stub().callsArg(1)