From abe41b6948ff29a670ed631936797f422052e5a5 Mon Sep 17 00:00:00 2001 From: Shane Kilkelly Date: Thu, 21 Sep 2017 13:37:10 +0100 Subject: [PATCH] Fix projection in project query --- .../Features/Collaborators/CollaboratorsHandler.coffee | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/services/web/app/coffee/Features/Collaborators/CollaboratorsHandler.coffee b/services/web/app/coffee/Features/Collaborators/CollaboratorsHandler.coffee index 649d6a0116..cbe191fc04 100644 --- a/services/web/app/coffee/Features/Collaborators/CollaboratorsHandler.coffee +++ b/services/web/app/coffee/Features/Collaborators/CollaboratorsHandler.coffee @@ -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 = []