mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
log out when a doc from the project collection is used
This commit is contained in:
parent
18a05d8813
commit
daf7c4f68e
2 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@ module.exports = DocManager =
|
|||
if docFromDocCollection?
|
||||
return callback null, docFromDocCollection, mongoPath
|
||||
else if doc?
|
||||
logger.warn project_id:project_id, doc_id:doc_id, "doc just used from project collection, why?"
|
||||
return callback null, doc, mongoPath
|
||||
else
|
||||
return callback new Errors.NotFoundError("No such doc: #{project_id}")
|
||||
|
|
|
@ -11,7 +11,7 @@ describe "DocManager", ->
|
|||
beforeEach ->
|
||||
@DocManager = SandboxedModule.require modulePath, requires:
|
||||
"./MongoManager": @MongoManager = {}
|
||||
"logger-sharelatex": @logger = {log: sinon.stub()}
|
||||
"logger-sharelatex": @logger = {log: sinon.stub(), warn:->}
|
||||
@doc_id = ObjectId().toString()
|
||||
@project_id = ObjectId().toString()
|
||||
@callback = sinon.stub()
|
||||
|
|
Loading…
Reference in a new issue