Skip to content

Commit

Permalink
#56 Treat annotations shared with docOwner as Mine
Browse files Browse the repository at this point in the history
  • Loading branch information
blms committed Nov 19, 2020
1 parent 08750ef commit c4fde76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
&& (
<Badge
variant="info"
key={annotation.permissions.groups.sort()[0]}
Expand Down
2 changes: 2 additions & 0 deletions src/pages/api/annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const handler = async (req, res) => {
.collection('annotations')
.find({
'permissions.private': false,
'permissions.documentOwner': false,
'permissions.groups': { $in: groupIds },
})
.limit(parseInt(limit, 10))
Expand All @@ -64,6 +65,7 @@ const handler = async (req, res) => {
.collection('annotations')
.find({
'permissions.private': false,
'permissions.documentOwner': false,
'permissions.groups': { $in: groupIds },
})
.toArray();
Expand Down

0 comments on commit c4fde76

Please sign in to comment.