Skip to content

Commit

Permalink
restrict to owners only
Browse files Browse the repository at this point in the history
  • Loading branch information
rssk committed Nov 16, 2023
1 parent 3d059f8 commit 791f845
Show file tree
Hide file tree
Showing 8 changed files with 51,011 additions and 79,281 deletions.
12,286 changes: 5,990 additions & 6,296 deletions packages/coinstac-api-server/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/coinstac-api-server/src/data/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ const resolvers = {

steplessPipelines.forEach(p => pipelines[p._id] = p);

const accessibleConsortia = await db.collection('consortia').find({ [`members.${credentials.id}`]: { $exists: true } }).toArray();
const accessibleConsortia = await db.collection('consortia').find({ [`owners.${credentials.id}`]: { $exists: true } }).toArray();
const consortiaIds = accessibleConsortia.map(consortium => String(consortium._id));
const res = Object.values(pipelines).filter(pipeline =>
consortiaIds.includes(String(pipeline.owningConsortium)) || pipeline.shared
Expand Down
Loading

0 comments on commit 791f845

Please sign in to comment.