- Modified privacywrite query with graphLookup:

$graphLookup: {
        from: "projects",
        startWith: "$id_main_project",
        connectFromField: "id_main_project",
        connectToField: "_id",
        as: "ris",
        restrictSearchWithMatch: { $or: [{ privacyread: server_constants.Privacy.all }, { userId: userId }] }
      }
    },
    { $match: { "ris.privacyread": { $exists: true } } },
This commit is contained in:
Paolo Arena
2019-04-13 03:04:49 +02:00
parent 1deba2a5ff
commit 6a0b7db73c
6 changed files with 94 additions and 32 deletions

View File

@@ -15,7 +15,7 @@ module.exports = Object.freeze({
LIST_END: '10000000',
LIST_START: '0',
LIST_START: null,
Privacy: {
all: 'all',