@openneuro/server 4.39.4 → 4.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openneuro/server",
3
- "version": "4.39.4",
3
+ "version": "4.40.1",
4
4
  "description": "Core service for the OpenNeuro platform.",
5
5
  "license": "MIT",
6
6
  "main": "src/server.js",
@@ -21,7 +21,7 @@
21
21
  "@elastic/elasticsearch": "8.13.1",
22
22
  "@graphql-tools/schema": "^10.0.0",
23
23
  "@keyv/redis": "^4.5.0",
24
- "@openneuro/search": "^4.39.4",
24
+ "@openneuro/search": "^4.40.1",
25
25
  "@sentry/node": "^8.25.0",
26
26
  "@sentry/profiling-node": "^8.25.0",
27
27
  "base64url": "^3.0.0",
@@ -89,5 +89,5 @@
89
89
  "publishConfig": {
90
90
  "access": "public"
91
91
  },
92
- "gitHead": "33eff68009410654d8e3b07207cc01bf9426dedb"
92
+ "gitHead": "13b2bc732c4d9acdd1d5ca81d79f2bfdeb392b3c"
93
93
  }
@@ -95,6 +95,10 @@ export const checkDatasetRead = async (datasetId, userId, userInfo) => {
95
95
  return true
96
96
  }
97
97
  }
98
+ // Allow worker scoped tokens to read specific datasets
99
+ if (userId && userInfo?.worker && datasetId === userInfo?.dataset) {
100
+ return true
101
+ }
98
102
  // Check that dataset exists.
99
103
  await checkDatasetExists(datasetId)
100
104
  // Look for any matching datasets