From c4fde7665125b5d1c942aff8f4df4bf5d2bb0214 Mon Sep 17 00:00:00 2001 From: Ben Silverman Date: Wed, 18 Nov 2020 20:49:52 -0700 Subject: [PATCH] #56 Treat annotations shared with docOwner as Mine --- .../DashboardAnnotationList/DashboardAnnotationList.js | 4 +++- src/pages/api/annotations.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Dashboard/DashboardAnnotationList/DashboardAnnotationList.js b/src/components/Dashboard/DashboardAnnotationList/DashboardAnnotationList.js index 92b1ccb6..cd5f1713 100644 --- a/src/components/Dashboard/DashboardAnnotationList/DashboardAnnotationList.js +++ b/src/components/Dashboard/DashboardAnnotationList/DashboardAnnotationList.js @@ -120,7 +120,9 @@ const DashboardAnnotationList = ({ {') '} {annotation.permissions.groups && annotation.permissions.groups.length > 0 - && annotation.permissions.private === false && ( + && annotation.permissions.private === false + && annotation.permissions.documentOwner === false + && ( { .collection('annotations') .find({ 'permissions.private': false, + 'permissions.documentOwner': false, 'permissions.groups': { $in: groupIds }, }) .limit(parseInt(limit, 10)) @@ -64,6 +65,7 @@ const handler = async (req, res) => { .collection('annotations') .find({ 'permissions.private': false, + 'permissions.documentOwner': false, 'permissions.groups': { $in: groupIds }, }) .toArray();