@openneuro/server 4.38.0-alpha.0 → 4.38.0-alpha.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.38.0-alpha.
|
|
3
|
+
"version": "4.38.0-alpha.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.38.0-alpha.
|
|
24
|
+
"@openneuro/search": "^4.38.0-alpha.1",
|
|
25
25
|
"@sentry/node": "^8.25.0",
|
|
26
26
|
"@sentry/profiling-node": "^8.25.0",
|
|
27
27
|
"base64url": "^3.0.0",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"publishConfig": {
|
|
89
89
|
"access": "public"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "c7a1350704df419d17999699e056030b9aa0bd66"
|
|
92
92
|
}
|
|
@@ -164,29 +164,31 @@ const parseQuery = async (query, datasetType, datasetStatus, userId) => {
|
|
|
164
164
|
},
|
|
165
165
|
}
|
|
166
166
|
addClause(query, "filter", termsClause)
|
|
167
|
-
|
|
168
|
-
if (datasetStatus
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
// Add logic to explicitly check for the "All" status
|
|
168
|
+
if (datasetStatus && datasetStatus !== "All") {
|
|
169
|
+
if (datasetStatus === "Public") {
|
|
170
|
+
addClause(query, "filter", {
|
|
171
|
+
term: {
|
|
172
|
+
public: {
|
|
173
|
+
value: true,
|
|
174
|
+
},
|
|
173
175
|
},
|
|
174
|
-
}
|
|
175
|
-
})
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
["permissions.userPermissions.level"]: ["ro", "rw"],
|
|
180
|
-
},
|
|
181
|
-
})
|
|
182
|
-
} else if (datasetStatus === "Invalid") {
|
|
183
|
-
addClause(query, "filter", {
|
|
184
|
-
range: {
|
|
185
|
-
"latestSnapshot.validation.errors": {
|
|
186
|
-
gt: 0,
|
|
176
|
+
})
|
|
177
|
+
} else if (datasetStatus === "Shared with Me") {
|
|
178
|
+
addClause(query, "filter", {
|
|
179
|
+
terms: {
|
|
180
|
+
["permissions.userPermissions.level"]: ["ro", "rw"],
|
|
187
181
|
},
|
|
188
|
-
}
|
|
189
|
-
})
|
|
182
|
+
})
|
|
183
|
+
} else if (datasetStatus === "Invalid") {
|
|
184
|
+
addClause(query, "filter", {
|
|
185
|
+
range: {
|
|
186
|
+
"latestSnapshot.validation.errors": {
|
|
187
|
+
gt: 0,
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
})
|
|
191
|
+
}
|
|
190
192
|
}
|
|
191
193
|
}
|
|
192
194
|
return query
|