Load user features alongside id and email.

Fixes a bug where project features were not applied properly,
and instead fell back to the free-account defaults.
This commit is contained in:
Shane Kilkelly 2017-09-01 11:16:45 +01:00
parent 184c8adb84
commit 68f860b28d

View file

@ -30,7 +30,7 @@ module.exports = CollaboratorsHandler =
return callback(error) if error? return callback(error) if error?
return callback null, members.map (m) -> m.id return callback null, members.map (m) -> m.id
USER_PROJECTION: { _id: 1, email: 1 } USER_PROJECTION: { _id: 1, email: 1, features: 1}
getMembersWithPrivilegeLevels: (project_id, callback = (error, members) ->) -> getMembersWithPrivilegeLevels: (project_id, callback = (error, members) ->) ->
CollaboratorsHandler.getMemberIdsWithPrivilegeLevels project_id, (error, members = []) -> CollaboratorsHandler.getMemberIdsWithPrivilegeLevels project_id, (error, members = []) ->
return callback(error) if error? return callback(error) if error?