mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-08 11:53:09 +00:00
Fix projection in project query
This commit is contained in:
parent
7dc759482c
commit
abe41b6948
1 changed files with 7 additions and 1 deletions
|
@ -18,7 +18,13 @@ Sources =
|
|||
module.exports = CollaboratorsHandler =
|
||||
|
||||
getMemberIdsWithPrivilegeLevels: (project_id, callback = (error, members) ->) ->
|
||||
Project.findOne { _id: project_id }, { owner_ref: 1, collaberator_refs: 1, readOnly_refs: 1 }, (error, project) ->
|
||||
projection =
|
||||
owner_ref: 1,
|
||||
collaberator_refs: 1,
|
||||
readOnly_refs: 1,
|
||||
tokenAccessReadOnly_refs: 1,
|
||||
tokenAccessReadAndWrite_refs: 1
|
||||
Project.findOne { _id: project_id }, projection, (error, project) ->
|
||||
return callback(error) if error?
|
||||
return callback new Errors.NotFoundError("no project found with id #{project_id}") if !project?
|
||||
members = []
|
||||
|
|
Loading…
Add table
Reference in a new issue