@opensaas/stack-core 0.40.0 → 0.42.0
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +65 -0
- package/CLAUDE.md +52 -0
- package/dist/access/access-filter.d.ts +88 -18
- package/dist/access/access-filter.d.ts.map +1 -1
- package/dist/access/access-filter.js +343 -36
- package/dist/access/access-filter.js.map +1 -1
- package/dist/access/access-filter.test.js +759 -6
- package/dist/access/access-filter.test.js.map +1 -1
- package/dist/access/denied-relation-visibility.test.d.ts +2 -0
- package/dist/access/denied-relation-visibility.test.d.ts.map +1 -0
- package/dist/access/denied-relation-visibility.test.js +114 -0
- package/dist/access/denied-relation-visibility.test.js.map +1 -0
- package/dist/access/engine.d.ts +11 -0
- package/dist/access/engine.d.ts.map +1 -1
- package/dist/access/engine.js +26 -0
- package/dist/access/engine.js.map +1 -1
- package/dist/access/errors.d.ts +34 -0
- package/dist/access/errors.d.ts.map +1 -1
- package/dist/access/errors.js +47 -0
- package/dist/access/errors.js.map +1 -1
- package/dist/access/field-visibility.d.ts +2 -2
- package/dist/access/field-visibility.d.ts.map +1 -1
- package/dist/access/field-visibility.js +73 -23
- package/dist/access/field-visibility.js.map +1 -1
- package/dist/access/index.d.ts +7 -3
- package/dist/access/index.d.ts.map +1 -1
- package/dist/access/index.js +9 -2
- package/dist/access/index.js.map +1 -1
- package/dist/access/multi-column-read-write.test.js.map +1 -1
- package/dist/access/query-validation.d.ts +31 -0
- package/dist/access/query-validation.d.ts.map +1 -1
- package/dist/access/query-validation.js +75 -16
- package/dist/access/query-validation.js.map +1 -1
- package/dist/access/relationship-count.d.ts +41 -3
- package/dist/access/relationship-count.d.ts.map +1 -1
- package/dist/access/relationship-count.js +44 -7
- package/dist/access/relationship-count.js.map +1 -1
- package/dist/access/relationship-count.test.js +62 -0
- package/dist/access/relationship-count.test.js.map +1 -1
- package/dist/access/synthetic-include-read.test.d.ts +2 -0
- package/dist/access/synthetic-include-read.test.d.ts.map +1 -0
- package/dist/access/synthetic-include-read.test.js +121 -0
- package/dist/access/synthetic-include-read.test.js.map +1 -0
- package/dist/config/types.d.ts +70 -58
- package/dist/config/types.d.ts.map +1 -1
- package/dist/context/hook-pipeline.d.ts +2 -2
- package/dist/context/hook-pipeline.d.ts.map +1 -1
- package/dist/context/hook-pipeline.js.map +1 -1
- package/dist/context/index.d.ts +16 -1
- package/dist/context/index.d.ts.map +1 -1
- package/dist/context/index.js +76 -26
- package/dist/context/index.js.map +1 -1
- package/dist/context/nested-operations.d.ts +2 -2
- package/dist/context/nested-operations.d.ts.map +1 -1
- package/dist/context/nested-operations.js +21 -3
- package/dist/context/nested-operations.js.map +1 -1
- package/dist/context/write-pipeline.d.ts.map +1 -1
- package/dist/context/write-pipeline.js +23 -29
- package/dist/context/write-pipeline.js.map +1 -1
- package/dist/hooks/index.d.ts +16 -15
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/package.json +2 -2
- package/src/access/access-filter.test.ts +1403 -159
- package/src/access/access-filter.ts +525 -47
- package/src/access/denied-relation-visibility.test.ts +173 -0
- package/src/access/engine.ts +28 -0
- package/src/access/errors.ts +55 -0
- package/src/access/field-visibility.ts +105 -24
- package/src/access/index.ts +11 -0
- package/src/access/multi-column-read-write.test.ts +3 -2
- package/src/access/query-validation.ts +136 -9
- package/src/access/relationship-count.test.ts +75 -0
- package/src/access/relationship-count.ts +53 -10
- package/src/access/synthetic-include-read.test.ts +179 -0
- package/src/config/types.ts +76 -50
- package/src/context/hook-pipeline.ts +4 -2
- package/src/context/index.ts +120 -39
- package/src/context/nested-operations.ts +35 -11
- package/src/context/write-pipeline.ts +52 -32
- package/src/hooks/index.ts +22 -15
- package/tests/context.test.ts +193 -5
- package/tests/hook-context-secured.test.ts +424 -0
- package/tests/nested-access-and-hooks.test.ts +324 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { checkAccess, getRelatedListConfig } from './engine.js';
|
|
1
|
+
import { checkAccess, getRelatedListConfig, resolveSyntheticReverseRelation, listSyntheticReverseRelationNames, } from './engine.js';
|
|
2
2
|
import { READ_INCLUDE_MAX_DEPTH } from './depth-limits.js';
|
|
3
|
-
import { AccessScopeDepthExceededError, RelationFilterAccessDeniedError } from './errors.js';
|
|
4
|
-
import { LOGICAL_OPERATORS, RELATION_QUANTIFIERS, resolveQueryField, walkWhereReadAccess, } from './query-validation.js';
|
|
3
|
+
import { AccessScopeDepthExceededError, RelationFilterAccessDeniedError, UndeclaredCountKeyError, UndeclaredIncludeKeyError, } from './errors.js';
|
|
4
|
+
import { LOGICAL_OPERATORS, RELATION_QUANTIFIERS, resolveQueryField, validateQueryFieldReadAccess, validateQueryKeys, walkWhereReadAccess, } from './query-validation.js';
|
|
5
|
+
import { isToManyRelationshipField, resolveCountAccessEntryForList } from './relationship-count.js';
|
|
5
6
|
import { getDbKey } from '../lib/case-utils.js';
|
|
6
7
|
/** A plain object — excludes `null` and arrays, which `typeof x === 'object'` alone would admit. */
|
|
7
8
|
function isPlainObject(value) {
|
|
@@ -56,25 +57,212 @@ export function emptyToOneAccessFilterTree() {
|
|
|
56
57
|
function isToOneAccessFilterTreeEmpty(tree) {
|
|
57
58
|
return Object.keys(tree.filters).length === 0 && Object.keys(tree.nested).length === 0;
|
|
58
59
|
}
|
|
59
|
-
/**
|
|
60
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Whether a relationship field is to-one (at most one related row) rather
|
|
62
|
+
* than to-many. Exported so `field-visibility.ts` can pick the same `null`
|
|
63
|
+
* (to-one) vs `[]` (to-many) shape for a denied relation's forced value
|
|
64
|
+
* (issue #1103) that this module used to decide whether to record the
|
|
65
|
+
* denial in the first place — one source of truth for arity, not two.
|
|
66
|
+
*/
|
|
67
|
+
export function isToOneRelationship(fieldConfig) {
|
|
61
68
|
return !('many' in fieldConfig && fieldConfig.many === true);
|
|
62
69
|
}
|
|
70
|
+
export function emptyCountAccessDenialTree() {
|
|
71
|
+
return { keys: new Set(), nested: {} };
|
|
72
|
+
}
|
|
73
|
+
function isCountAccessDenialTreeEmpty(tree) {
|
|
74
|
+
return tree.keys.size === 0 && Object.keys(tree.nested).length === 0;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Normalize a caller's `_count` include value to the `_count.select` map it
|
|
78
|
+
* names. `true` (Prisma's "count every relation" shorthand) expands to every
|
|
79
|
+
* countable relation Prisma itself carries on this model — every DECLARED
|
|
80
|
+
* to-many relationship, plus every synthetic back-relation a list-only `ref`
|
|
81
|
+
* elsewhere in the config synthesizes onto it (issue #1082): Prisma's own
|
|
82
|
+
* `_count: true` has always counted both, and dropping the synthetic ones
|
|
83
|
+
* here would silently stop counting a relation the caller used to get a
|
|
84
|
+
* (previously unscoped) count for. Returns `null` for a shape that requests
|
|
85
|
+
* nothing countable (`false`, or an object with no usable `select`).
|
|
86
|
+
*/
|
|
87
|
+
function normalizeCountSelect(requestedValue, fieldConfigs, listKey, config) {
|
|
88
|
+
if (requestedValue === true) {
|
|
89
|
+
const expanded = {};
|
|
90
|
+
for (const [fieldName, fieldConfig] of Object.entries(fieldConfigs)) {
|
|
91
|
+
if (isToManyRelationshipField(fieldConfig))
|
|
92
|
+
expanded[fieldName] = true;
|
|
93
|
+
}
|
|
94
|
+
for (const syntheticName of listSyntheticReverseRelationNames(listKey, config)) {
|
|
95
|
+
expanded[syntheticName] = true;
|
|
96
|
+
}
|
|
97
|
+
return expanded;
|
|
98
|
+
}
|
|
99
|
+
if (isPlainObject(requestedValue) && isPlainObject(requestedValue.select)) {
|
|
100
|
+
return requestedValue.select;
|
|
101
|
+
}
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Scope a caller-supplied `_count` include value by each named relation's own
|
|
106
|
+
* `query` access — the `_count` counterpart to the rest of this module's
|
|
107
|
+
* relation scoping (issue #1087, closing the one key `buildAccessScopedInclude`
|
|
108
|
+
* used to allowlist through unscoped, #1082's "Out of scope").
|
|
109
|
+
*
|
|
110
|
+
* For each key in the caller's `_count.select` (or, for bare `_count: true`,
|
|
111
|
+
* every declared to-many relation — see `normalizeCountSelect`):
|
|
112
|
+
* - Not a declared to-many relationship and not a synthetic back-relation
|
|
113
|
+
* (#1082 — always genuinely countable) → THROWN as
|
|
114
|
+
* `UndeclaredCountKeyError`, matching `buildAccessScopedInclude`'s own
|
|
115
|
+
* rejection for the ordinary walk. A declared to-many relationship whose
|
|
116
|
+
* `ref` cannot be resolved is skipped instead, matching that same walk's
|
|
117
|
+
* handling of a config-level dangling ref (not a caller error).
|
|
118
|
+
* - The counting list's OWN field-level `read` access on the relationship
|
|
119
|
+
* field being counted denies it, or the related list's `query` access
|
|
120
|
+
* denies it (`=== false`) → omitted from the select sent to Prisma and
|
|
121
|
+
* added to the returned `deniedKeys`, so `filterReadableFields` can inject
|
|
122
|
+
* `0` post-query (a count is session-relative; denial doesn't mean "no such
|
|
123
|
+
* relation"). The field-level check has nothing to evaluate for a synthetic
|
|
124
|
+
* back-relation (no field of its own on this list) and is skipped for it —
|
|
125
|
+
* `resolveCountAccessEntryForList` (issue #1111). Both checks run BEFORE
|
|
126
|
+
* any caller-supplied nested `where` is validated — validating first would
|
|
127
|
+
* let a caller who cannot read a single row of the related list learn its
|
|
128
|
+
* field names and field-level read rules from a thrown `ValidationError`
|
|
129
|
+
* alone, reopening the exact oracle #915/ADR-0031 closed for a top-level
|
|
130
|
+
* predicate.
|
|
131
|
+
* - Otherwise → the caller-supplied nested `where` at that key (if any) is
|
|
132
|
+
* key- and read-access-validated against the RELATED list via the same
|
|
133
|
+
* `validateQueryKeys`/`validateQueryFieldReadAccess` primitives
|
|
134
|
+
* `createFindMany` already runs on a top-level `where` (#912/#915), then
|
|
135
|
+
* run through `buildAccessScopedWhere` — the same fold `createFindMany`
|
|
136
|
+
* applies to a top-level `where` (#916) — so a relation filter nested
|
|
137
|
+
* inside IT (e.g. `_count.select.posts.where.comments.some`) is scoped by
|
|
138
|
+
* THAT further list's own `query` access too, not just the counted
|
|
139
|
+
* relation's. The result is AND-combined with the counted relation's own
|
|
140
|
+
* access filter (if any) — reusing `andWhere`, never replacing the
|
|
141
|
+
* caller's condition, mirroring `buildAccessScopedInclude` itself.
|
|
142
|
+
*/
|
|
143
|
+
async function buildAccessScopedCountSelect(requestedValue, fieldConfigs, args, config, listKey) {
|
|
144
|
+
const requestedSelect = normalizeCountSelect(requestedValue, fieldConfigs, listKey, config);
|
|
145
|
+
const deniedKeys = new Set();
|
|
146
|
+
if (!requestedSelect)
|
|
147
|
+
return { select: undefined, deniedKeys };
|
|
148
|
+
const select = {};
|
|
149
|
+
for (const [key, entryValue] of Object.entries(requestedSelect)) {
|
|
150
|
+
// A caller can explicitly exclude a key from the `true`-expanded set the
|
|
151
|
+
// same way Prisma's own `select` excludes a field.
|
|
152
|
+
if (entryValue === false)
|
|
153
|
+
continue;
|
|
154
|
+
const fieldConfig = fieldConfigs[key];
|
|
155
|
+
const isDeclaredToMany = isToManyRelationshipField(fieldConfig);
|
|
156
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- ListConfig must accept any TypeInfo
|
|
157
|
+
let relatedConfig = null;
|
|
158
|
+
if (isDeclaredToMany && fieldConfig && 'ref' in fieldConfig) {
|
|
159
|
+
relatedConfig = getRelatedListConfig(fieldConfig.ref, config);
|
|
160
|
+
}
|
|
161
|
+
if (!relatedConfig && !isDeclaredToMany) {
|
|
162
|
+
const synthetic = resolveSyntheticReverseRelation(key, listKey, config);
|
|
163
|
+
if (synthetic) {
|
|
164
|
+
relatedConfig = {
|
|
165
|
+
listName: synthetic.sourceListName,
|
|
166
|
+
listConfig: synthetic.sourceListConfig,
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (!relatedConfig) {
|
|
171
|
+
// A declared to-many field whose `ref` didn't resolve is a config
|
|
172
|
+
// issue, not a caller error — skip it exactly like the ordinary
|
|
173
|
+
// include walk does for the same case.
|
|
174
|
+
if (isDeclaredToMany)
|
|
175
|
+
continue;
|
|
176
|
+
throw new UndeclaredCountKeyError(listKey, key);
|
|
177
|
+
}
|
|
178
|
+
// `fieldConfig` is undefined for a synthetic back-relation (#1082) — it has
|
|
179
|
+
// no field of its own on THIS list, so there is no field-level `read`
|
|
180
|
+
// access to fold in; `resolveCountAccessEntryForList` treats a missing
|
|
181
|
+
// `fieldAccess` as exempt, matching the ordinary include path's own lack
|
|
182
|
+
// of a field-level gate for a synthetic key (issue #1111).
|
|
183
|
+
const accessEntry = await resolveCountAccessEntryForList(relatedConfig.listConfig, args, fieldConfig?.access);
|
|
184
|
+
// Denial is checked BEFORE the caller's nested `where` is validated —
|
|
185
|
+
// mirroring `buildAccessScopedWhere`'s own ordering below. A fully denied
|
|
186
|
+
// relation counts `0` no matter what `where` the caller supplied, so
|
|
187
|
+
// validating it first would let a caller who cannot read a single row of
|
|
188
|
+
// the related list learn its field names and field-level read rules from
|
|
189
|
+
// a `ValidationError`'s message alone — the exact oracle #915/ADR-0031
|
|
190
|
+
// closed for a top-level predicate, reopened here if this ran first.
|
|
191
|
+
if (accessEntry.kind === 'denied') {
|
|
192
|
+
deniedKeys.add(key);
|
|
193
|
+
continue;
|
|
194
|
+
}
|
|
195
|
+
const requestedWhere = isPlainObject(entryValue) && isPlainObject(entryValue.where)
|
|
196
|
+
? entryValue.where
|
|
197
|
+
: undefined;
|
|
198
|
+
let scopedRequestedWhere;
|
|
199
|
+
if (requestedWhere) {
|
|
200
|
+
// Mirrors `buildAccessScopedInclude`'s own `resolveSyntheticRelation`
|
|
201
|
+
// closure (#1092/#916) — a synthetic back-relation (#1082) named inside
|
|
202
|
+
// this count entry's own `where` resolves against its source list
|
|
203
|
+
// rather than being rejected as undeclared, at every hop.
|
|
204
|
+
const resolveSyntheticRelation = (syntheticKey, fromListName) => {
|
|
205
|
+
const synthetic = resolveSyntheticReverseRelation(syntheticKey, fromListName, config);
|
|
206
|
+
return synthetic
|
|
207
|
+
? { listConfig: synthetic.sourceListConfig, listName: synthetic.sourceListName }
|
|
208
|
+
: null;
|
|
209
|
+
};
|
|
210
|
+
validateQueryKeys({
|
|
211
|
+
where: requestedWhere,
|
|
212
|
+
listConfig: relatedConfig.listConfig,
|
|
213
|
+
listName: relatedConfig.listName,
|
|
214
|
+
config,
|
|
215
|
+
isSudo: false,
|
|
216
|
+
resolveSyntheticRelation,
|
|
217
|
+
});
|
|
218
|
+
await validateQueryFieldReadAccess({
|
|
219
|
+
where: requestedWhere,
|
|
220
|
+
listConfig: relatedConfig.listConfig,
|
|
221
|
+
listName: relatedConfig.listName,
|
|
222
|
+
session: args.session,
|
|
223
|
+
context: args.context,
|
|
224
|
+
isSudo: false,
|
|
225
|
+
});
|
|
226
|
+
// A relation filter (`some`/`every`/`none`/`is`/`isNot`) nested inside
|
|
227
|
+
// the caller's own `where` names a THIRD list one hop further out —
|
|
228
|
+
// e.g. `_count.select.posts.where.comments.some`. Validation above only
|
|
229
|
+
// checked keys against the counted relation's OWN fields; without this,
|
|
230
|
+
// that nested relation would reach Prisma unscoped by ITS list's
|
|
231
|
+
// `query` access, letting the resulting count reveal whether
|
|
232
|
+
// inaccessible rows over there exist. `buildAccessScopedWhere` is the
|
|
233
|
+
// same fold `createFindMany` runs on an ordinary top-level `where`
|
|
234
|
+
// (#916) — reused here rather than re-derived.
|
|
235
|
+
scopedRequestedWhere = (await buildAccessScopedWhere(requestedWhere, relatedConfig.listConfig, relatedConfig.listName, config, args, resolveSyntheticRelation));
|
|
236
|
+
}
|
|
237
|
+
const scopedWhere = andWhere(accessEntry.kind === 'scoped' ? accessEntry.where : undefined, scopedRequestedWhere);
|
|
238
|
+
select[key] = scopedWhere ? { where: scopedWhere } : true;
|
|
239
|
+
}
|
|
240
|
+
return { select: Object.keys(select).length > 0 ? select : undefined, deniedKeys };
|
|
241
|
+
}
|
|
63
242
|
/**
|
|
64
243
|
* Build the access-scoped `include` for exactly the relations a read
|
|
65
244
|
* requested, recursing only into branches `requestedInclude` itself names.
|
|
66
245
|
*
|
|
67
246
|
* For each key in `requestedInclude`:
|
|
68
|
-
* -
|
|
69
|
-
* passed through unchanged (
|
|
70
|
-
*
|
|
247
|
+
* - A declared field that isn't a relationship (scalar, virtual, …) → access
|
|
248
|
+
* control does not govern it; passed through unchanged (a virtual key is
|
|
249
|
+
* stripped later by `stripVirtualFieldsFromInclude`, #628).
|
|
250
|
+
* - Not declared at all → resolved via `resolveSyntheticReverseRelation`
|
|
251
|
+
* (the synthetic-back-relation case above); `_count` is scoped by
|
|
252
|
+
* `buildAccessScopedCountSelect` (issue #1087 — each named relation's own
|
|
253
|
+
* `query` access, exactly like any other relation this walk scopes; a
|
|
254
|
+
* denied one is recorded for `filterReadableFields` to inject `0` for,
|
|
255
|
+
* post-query, since Prisma cannot be asked for a guaranteed `0`); anything
|
|
256
|
+
* else throws `UndeclaredIncludeKeyError` rather than reaching the
|
|
257
|
+
* database unscoped.
|
|
71
258
|
* - A declared relationship whose related list's `query` access denies it
|
|
72
259
|
* (`=== false`) → dropped entirely, no matter what the request asked for
|
|
73
260
|
* nested beneath it (#566): the caller chooses *which* relations, access
|
|
74
|
-
* control chooses *whether* and *with what filter*.
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
261
|
+
* control chooses *whether* and *with what filter*. This denial is also
|
|
262
|
+
* recorded in `toOneAccessFilters` (`kind: 'denied'`), for either arity, so
|
|
263
|
+
* `filterReadableFields` can still surface an explicit `null` (to-one,
|
|
264
|
+
* issue #974) or `[]` (to-many, issue #1103) for it rather than an absent
|
|
265
|
+
* key.
|
|
78
266
|
* - Otherwise, for a to-**many** relation → the access `where` is
|
|
79
267
|
* AND-combined with any caller-supplied nested `where` (never replaced —
|
|
80
268
|
* the other half of #566), and a caller-supplied `take` rides through
|
|
@@ -103,36 +291,119 @@ export async function buildAccessScopedInclude(requestedInclude, fieldConfigs, a
|
|
|
103
291
|
}
|
|
104
292
|
const result = {};
|
|
105
293
|
const toOneAccessFilters = emptyToOneAccessFilterTree();
|
|
294
|
+
const countDenials = emptyCountAccessDenialTree();
|
|
106
295
|
for (const [relationName, requestedValue] of Object.entries(requestedInclude)) {
|
|
296
|
+
// A caller can explicitly opt a relation OUT of a Prisma include with
|
|
297
|
+
// `false` (its `Include` type allows a bare `boolean`), or end up with an
|
|
298
|
+
// `undefined` value from a conditionally-built object
|
|
299
|
+
// (`{ posts: cond ? true : undefined }`) — Prisma treats both the same as
|
|
300
|
+
// the key being absent. Treat them identically here too, before this key
|
|
301
|
+
// ever reaches access evaluation: an explicitly-disabled relation was
|
|
302
|
+
// never actually requested, so it must not be evaluated, dropped as
|
|
303
|
+
// "denied", or recorded as needing a post-query fixup (issue #1103 code
|
|
304
|
+
// review) — any of those would surface a value (`[]`/`null`) for a key
|
|
305
|
+
// the caller deliberately excluded.
|
|
306
|
+
if (requestedValue === false || requestedValue === undefined)
|
|
307
|
+
continue;
|
|
107
308
|
const fieldConfig = fieldConfigs[relationName];
|
|
108
309
|
const isDeclaredRelationship = fieldConfig?.type === 'relationship' && 'ref' in fieldConfig && !!fieldConfig.ref;
|
|
109
|
-
|
|
310
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- ListConfig must accept any TypeInfo
|
|
311
|
+
let relatedConfig;
|
|
312
|
+
let isToOne;
|
|
313
|
+
if (isDeclaredRelationship) {
|
|
314
|
+
relatedConfig = getRelatedListConfig(fieldConfig.ref, config);
|
|
315
|
+
if (!relatedConfig)
|
|
316
|
+
continue;
|
|
317
|
+
isToOne = isToOneRelationship(fieldConfig);
|
|
318
|
+
}
|
|
319
|
+
else if (fieldConfig) {
|
|
320
|
+
// A declared field that is not a relationship — access control does
|
|
321
|
+
// not govern it here; passed through unchanged.
|
|
110
322
|
result[relationName] = requestedValue;
|
|
111
323
|
continue;
|
|
112
324
|
}
|
|
113
|
-
|
|
114
|
-
|
|
325
|
+
else if (relationName === '_count') {
|
|
326
|
+
const { select, deniedKeys } = await buildAccessScopedCountSelect(requestedValue, fieldConfigs, args, config, listKey);
|
|
327
|
+
if (select)
|
|
328
|
+
result[relationName] = { select };
|
|
329
|
+
if (deniedKeys.size > 0)
|
|
330
|
+
countDenials.keys = deniedKeys;
|
|
115
331
|
continue;
|
|
116
|
-
|
|
332
|
+
}
|
|
333
|
+
else {
|
|
334
|
+
const synthetic = resolveSyntheticReverseRelation(relationName, listKey, config);
|
|
335
|
+
if (!synthetic) {
|
|
336
|
+
throw new UndeclaredIncludeKeyError(listKey, relationName);
|
|
337
|
+
}
|
|
338
|
+
relatedConfig = { listName: synthetic.sourceListName, listConfig: synthetic.sourceListConfig };
|
|
339
|
+
// Always to-many — a list-only ref has one construction site and no
|
|
340
|
+
// arity branch, and one-to-one is structurally impossible for it.
|
|
341
|
+
isToOne = false;
|
|
342
|
+
}
|
|
117
343
|
const queryAccess = relatedConfig.listConfig.access?.operation?.query;
|
|
118
344
|
const accessResult = await checkAccess(queryAccess, {
|
|
119
345
|
session: args.session,
|
|
120
346
|
context: args.context,
|
|
121
347
|
});
|
|
122
348
|
if (accessResult === false) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
349
|
+
// Recorded for either arity (issue #1103) — a to-many relation is
|
|
350
|
+
// dropped from `include` here exactly like a to-one one, and needs the
|
|
351
|
+
// same post-query fixup so its key comes back `[]`, not silently
|
|
352
|
+
// absent from the row.
|
|
353
|
+
toOneAccessFilters.filters[relationName] = { kind: 'denied' };
|
|
126
354
|
continue;
|
|
127
355
|
}
|
|
128
356
|
const accessWhere = typeof accessResult === 'object' ? accessResult : undefined;
|
|
129
357
|
const requestedEntry = asEntryObject(requestedValue);
|
|
358
|
+
// #1092 — a nested `where`/`orderBy` gets the same #912/#915 checks the
|
|
359
|
+
// top-level `where`/`orderBy` already gets, resolved against the RELATED
|
|
360
|
+
// list (`relatedConfig`) rather than the current one, and run only once
|
|
361
|
+
// the relation is known to be accessible at all (same ordering reason as
|
|
362
|
+
// the top-level checks: don't leak a field's name/read-gating status to a
|
|
363
|
+
// caller who has zero access to the relation to begin with).
|
|
364
|
+
const resolveSyntheticRelation = (key, fromListName) => {
|
|
365
|
+
const synthetic = resolveSyntheticReverseRelation(key, fromListName, config);
|
|
366
|
+
return synthetic
|
|
367
|
+
? { listConfig: synthetic.sourceListConfig, listName: synthetic.sourceListName }
|
|
368
|
+
: null;
|
|
369
|
+
};
|
|
370
|
+
validateQueryKeys({
|
|
371
|
+
where: requestedEntry?.where,
|
|
372
|
+
orderBy: requestedEntry?.orderBy,
|
|
373
|
+
listConfig: relatedConfig.listConfig,
|
|
374
|
+
listName: relatedConfig.listName,
|
|
375
|
+
config,
|
|
376
|
+
isSudo: false,
|
|
377
|
+
resolveSyntheticRelation,
|
|
378
|
+
});
|
|
379
|
+
await validateQueryFieldReadAccess({
|
|
380
|
+
where: requestedEntry?.where,
|
|
381
|
+
orderBy: requestedEntry?.orderBy,
|
|
382
|
+
listConfig: relatedConfig.listConfig,
|
|
383
|
+
listName: relatedConfig.listName,
|
|
384
|
+
session: args.session,
|
|
385
|
+
context: args.context,
|
|
386
|
+
isSudo: false,
|
|
387
|
+
});
|
|
388
|
+
// The two checks above only reach the entry's own top-level keys — a
|
|
389
|
+
// relation quantifier (`some`/`every`/`none`/`is`/`isNot`) nested inside
|
|
390
|
+
// this `where` names a DEEPER related list, which needs the same
|
|
391
|
+
// treatment the top-level `where` already gets from `buildAccessScopedWhere`
|
|
392
|
+
// (#916): scope it by that deeper list's own `query` access and check ITS
|
|
393
|
+
// fields' read access, recursing through every further hop. Only for
|
|
394
|
+
// to-many — a to-one entry never carries `requestedEntry.where` through to
|
|
395
|
+
// Prisma at all (see below), so there is nothing here to scope.
|
|
396
|
+
const scopedRequestedWhere = !isToOne && requestedEntry?.where !== undefined
|
|
397
|
+
? (await buildAccessScopedWhere(requestedEntry.where, relatedConfig.listConfig, relatedConfig.listName, config, args, resolveSyntheticRelation))
|
|
398
|
+
: requestedEntry?.where;
|
|
130
399
|
let nestedInclude;
|
|
131
400
|
let nestedToOneFilters;
|
|
401
|
+
let nestedCountDenials;
|
|
132
402
|
if (requestedEntry?.include) {
|
|
133
403
|
const nested = await buildAccessScopedInclude(requestedEntry.include, relatedConfig.listConfig.fields, args, config, relatedConfig.listName, depth + 1);
|
|
134
404
|
nestedInclude = nested.include;
|
|
135
405
|
nestedToOneFilters = nested.toOneAccessFilters;
|
|
406
|
+
nestedCountDenials = nested.countDenials;
|
|
136
407
|
}
|
|
137
408
|
const entry = {};
|
|
138
409
|
if (isToOne) {
|
|
@@ -145,7 +416,7 @@ export async function buildAccessScopedInclude(requestedInclude, fieldConfigs, a
|
|
|
145
416
|
}
|
|
146
417
|
}
|
|
147
418
|
else {
|
|
148
|
-
const mergedWhere = andWhere(accessWhere,
|
|
419
|
+
const mergedWhere = andWhere(accessWhere, scopedRequestedWhere);
|
|
149
420
|
if (mergedWhere)
|
|
150
421
|
entry.where = mergedWhere;
|
|
151
422
|
if (requestedEntry?.take !== undefined)
|
|
@@ -160,9 +431,12 @@ export async function buildAccessScopedInclude(requestedInclude, fieldConfigs, a
|
|
|
160
431
|
if (nestedToOneFilters && !isToOneAccessFilterTreeEmpty(nestedToOneFilters)) {
|
|
161
432
|
toOneAccessFilters.nested[relationName] = nestedToOneFilters;
|
|
162
433
|
}
|
|
434
|
+
if (nestedCountDenials && !isCountAccessDenialTreeEmpty(nestedCountDenials)) {
|
|
435
|
+
countDenials.nested[relationName] = nestedCountDenials;
|
|
436
|
+
}
|
|
163
437
|
result[relationName] = Object.keys(entry).length > 0 ? entry : true;
|
|
164
438
|
}
|
|
165
|
-
return { include: result, toOneAccessFilters };
|
|
439
|
+
return { include: result, toOneAccessFilters, countDenials };
|
|
166
440
|
}
|
|
167
441
|
export function emptyToOneAccessVisibilityTree() {
|
|
168
442
|
return { filters: {}, nested: {} };
|
|
@@ -274,32 +548,55 @@ export async function resolveToOneAccessVisibility(items, tree, args) {
|
|
|
274
548
|
* caller can observe that an inaccessible related row exists (an `every`
|
|
275
549
|
* that "should" pass instead fails), but never that row's field values,
|
|
276
550
|
* which is the property this ticket exists to close.
|
|
551
|
+
*
|
|
552
|
+
* A quantifier's value of literal `null` (`is: null`/`isNot: null`, a to-one
|
|
553
|
+
* relation's existence check) is passed through untouched rather than folded:
|
|
554
|
+
* it names no fields to read-check or scope, and AND-folding an access filter
|
|
555
|
+
* into it would silently invert the caller's own predicate (see the inline
|
|
556
|
+
* comment at that branch).
|
|
557
|
+
*
|
|
558
|
+
* `resolveSyntheticRelation` (#1092/#1108) extends this to a key that
|
|
559
|
+
* resolves to a synthetic back-relation (#1082) rather than a declared
|
|
560
|
+
* field, recursing against its SOURCE list. Only `buildAccessScopedInclude`
|
|
561
|
+
* passes it, for the include-nested `where` position; the top-level `where`
|
|
562
|
+
* this function was originally built for (`context/index.ts`) omits it, so
|
|
563
|
+
* a synthetic key there is unaffected — matching #1092's own scope, which
|
|
564
|
+
* deliberately left the top-level checks unchanged.
|
|
277
565
|
*/
|
|
278
566
|
export async function buildAccessScopedWhere(where,
|
|
279
567
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- ListConfig must accept any TypeInfo
|
|
280
|
-
listConfig, listName, config, args
|
|
568
|
+
listConfig, listName, config, args,
|
|
569
|
+
// #1092/#1108 — the include-nested position's own addition, exactly
|
|
570
|
+
// mirroring `validateQueryKeys`'s `resolveSyntheticRelation` (see that
|
|
571
|
+
// module's doc comment): every top-level `where` caller omits this, so
|
|
572
|
+
// top-level behavior is unchanged.
|
|
573
|
+
resolveSyntheticRelation) {
|
|
281
574
|
if (where === null || typeof where !== 'object')
|
|
282
575
|
return where;
|
|
283
576
|
if (Array.isArray(where)) {
|
|
284
|
-
return Promise.all(where.map((entry) => buildAccessScopedWhere(entry, listConfig, listName, config, args)));
|
|
577
|
+
return Promise.all(where.map((entry) => buildAccessScopedWhere(entry, listConfig, listName, config, args, resolveSyntheticRelation)));
|
|
285
578
|
}
|
|
286
579
|
const result = {};
|
|
287
580
|
for (const [key, value] of Object.entries(where)) {
|
|
288
581
|
if (LOGICAL_OPERATORS.has(key)) {
|
|
289
|
-
result[key] = await buildAccessScopedWhere(value, listConfig, listName, config, args);
|
|
582
|
+
result[key] = await buildAccessScopedWhere(value, listConfig, listName, config, args, resolveSyntheticRelation);
|
|
290
583
|
continue;
|
|
291
584
|
}
|
|
292
585
|
const resolved = resolveQueryField(key, listConfig.fields);
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
586
|
+
// A synthetic back-relation (#1082) carries no `ref` of its own to
|
|
587
|
+
// follow — its "related" list for recursion is the SOURCE list it
|
|
588
|
+
// stands for, given directly by the resolver, not `getRelatedListConfig`.
|
|
589
|
+
const related = resolved?.isRelationship
|
|
590
|
+
? getRelatedListConfig(resolved.fieldConfig.ref, config)
|
|
591
|
+
: !resolved
|
|
592
|
+
? (() => {
|
|
593
|
+
const synthetic = resolveSyntheticRelation?.(key, listName);
|
|
594
|
+
return synthetic
|
|
595
|
+
? { listConfig: synthetic.listConfig, listName: synthetic.listName }
|
|
596
|
+
: null;
|
|
597
|
+
})()
|
|
598
|
+
: null;
|
|
599
|
+
if (!related || value === null || typeof value !== 'object' || Array.isArray(value)) {
|
|
303
600
|
result[key] = value;
|
|
304
601
|
continue;
|
|
305
602
|
}
|
|
@@ -321,8 +618,18 @@ listConfig, listName, config, args) {
|
|
|
321
618
|
nestedEntry[quantifier] = quantifierValue;
|
|
322
619
|
continue;
|
|
323
620
|
}
|
|
621
|
+
if (quantifierValue === null) {
|
|
622
|
+
// `is: null` / `isNot: null` tests EXISTENCE of a to-one relation,
|
|
623
|
+
// not its fields — there is nothing to read-check or scope, and
|
|
624
|
+
// AND-folding the access filter in here would silently invert the
|
|
625
|
+
// caller's predicate: `is: null` ("has no related row") would
|
|
626
|
+
// become `is: <accessWhere>` ("has a related row matching the
|
|
627
|
+
// filter"), the opposite of what was asked. Passed through as-is.
|
|
628
|
+
nestedEntry[quantifier] = null;
|
|
629
|
+
continue;
|
|
630
|
+
}
|
|
324
631
|
await walkWhereReadAccess(quantifierValue, related.listConfig, related.listName, args);
|
|
325
|
-
const scopedNested = await buildAccessScopedWhere(quantifierValue, related.listConfig, related.listName, config, args);
|
|
632
|
+
const scopedNested = await buildAccessScopedWhere(quantifierValue, related.listConfig, related.listName, config, args, resolveSyntheticRelation);
|
|
326
633
|
nestedEntry[quantifier] = accessWhere
|
|
327
634
|
? andWhere(accessWhere, scopedNested)
|
|
328
635
|
: scopedNested;
|
|
@@ -336,7 +643,7 @@ listConfig, listName, config, args) {
|
|
|
336
643
|
// (fully-allowed related list) is returned exactly as the caller wrote
|
|
337
644
|
// it, so an already-permitted query is not perturbed by this pass.
|
|
338
645
|
await walkWhereReadAccess(value, related.listConfig, related.listName, args);
|
|
339
|
-
const scopedNested = await buildAccessScopedWhere(value, related.listConfig, related.listName, config, args);
|
|
646
|
+
const scopedNested = await buildAccessScopedWhere(value, related.listConfig, related.listName, config, args, resolveSyntheticRelation);
|
|
340
647
|
result[key] = accessWhere
|
|
341
648
|
? { is: andWhere(accessWhere, scopedNested) }
|
|
342
649
|
: scopedNested;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access-filter.js","sourceRoot":"","sources":["../../src/access/access-filter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAA;AAC5F,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAyD/C,oGAAoG;AACpG,SAAS,aAAa,CAAC,KA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