@protobase/server 0.54.5 → 0.54.6
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/dist/check-views.js +1 -1
- package/dist/package.js +1 -1
- package/dist/view-access.js +6 -1
- package/package.json +4 -4
package/dist/check-views.js
CHANGED
|
@@ -21,7 +21,7 @@ const actionFields = (run) => {
|
|
|
21
21
|
const sensitiveErrors = (view, model) => {
|
|
22
22
|
const sensitive = (name) => Boolean(model.fields[name]?.sensitive);
|
|
23
23
|
return [
|
|
24
|
-
["the title", view.title === void 0 ? [] : [view.title]],
|
|
24
|
+
["the title", [...view.title === void 0 ? [] : [view.title], ...view.titleFrom?.fields ?? []]],
|
|
25
25
|
["the search result", [...view.searchResult?.title ?? [], ...view.searchResult?.subtitle ? [view.searchResult.subtitle] : []]],
|
|
26
26
|
["a list column, sort or search", [
|
|
27
27
|
...view.list?.columns ?? [],
|
package/dist/package.js
CHANGED
package/dist/view-access.js
CHANGED
|
@@ -316,6 +316,11 @@ const viewShape = (resource, model, models, prompted, createPages, writeOnly) =>
|
|
|
316
316
|
resource: shapes.data,
|
|
317
317
|
roles: shapes.data,
|
|
318
318
|
title: shapes.field,
|
|
319
|
+
titleFrom: shapes.map((from) => from.fields.every((name) => Object.hasOwn(model.fields, name)) ? from : {
|
|
320
|
+
rule: from.rule,
|
|
321
|
+
fields: [],
|
|
322
|
+
unreadable: true
|
|
323
|
+
}),
|
|
319
324
|
searchResult: shapes.object({
|
|
320
325
|
title: shapes.list(shapes.field, { nonEmpty: true }),
|
|
321
326
|
subtitle: shapes.field
|
|
@@ -354,7 +359,7 @@ const viewShape = (resource, model, models, prompted, createPages, writeOnly) =>
|
|
|
354
359
|
};
|
|
355
360
|
/**
|
|
356
361
|
* The view with every reference to a field the caller cannot read removed: list columns, sort, search and displays,
|
|
357
|
-
* field hints, filter widgets, record sections, maps, galleries and custom components' props, the chart, title and search result, the
|
|
362
|
+
* field hints, filter widgets, record sections, maps, galleries and custom components' props, the chart, title, derived title and search result, the
|
|
358
363
|
* actions that set or read one, and the sidebar's `recent` group. Nothing in it may name a hidden field. Related sections, charts of related records, related list columns
|
|
359
364
|
* and links are checked against `models`, the caller's view of every resource, and so are `searchesOf`, cards' favorite
|
|
360
365
|
* buttons and the "Save search" button; the buttons stay for a visitor when their resource is one of `prompted`, those
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/server",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.6",
|
|
4
4
|
"description": "The Protobase REST API as a Hono app, with Better Auth sign-in.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@better-auth/passkey": "^1.7.12",
|
|
41
41
|
"@better-auth/sso": "^1.7.12",
|
|
42
42
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
43
|
-
"@protobase/layout": "0.54.
|
|
44
|
-
"@protobase/query": "0.54.
|
|
45
|
-
"@protobase/schema": "0.54.
|
|
43
|
+
"@protobase/layout": "0.54.6",
|
|
44
|
+
"@protobase/query": "0.54.6",
|
|
45
|
+
"@protobase/schema": "0.54.6",
|
|
46
46
|
"@react-email/render": "^2.1.0",
|
|
47
47
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
48
48
|
"@sentry/core": "^11.7.0",
|