mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-25 02:00:10 +02:00
Downgraded unathorised log to warning
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -116,7 +116,10 @@ describe 'WebsocketController', ->
|
||||
@callback
|
||||
.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)
|
||||
|
||||
Reference in New Issue
Block a user