Docs: forms reject text over 5000 characters; Site settings update is editor+
(a) The code rejects an over-long value (kind 'too_long', validation text at the field, answers kept); the limit is fixed. (c) Site settings update needs the editor role; overridable with globalOverrides. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
37592764b5
commit
40fed78da2
+4
-1
@@ -535,7 +535,10 @@ form), but `create`/`update`/`delete` and reading the Emails tab (recipients, BC
|
|||||||
|
|
||||||
Validation matters, because a server action is a public endpoint — it can be called
|
Validation matters, because a server action is a public endpoint — it can be called
|
||||||
without the form. The plugin loads the form definition and: rejects unknown
|
without the form. The plugin loads the form definition and: rejects unknown
|
||||||
keys, enforces `required` fields, truncates length (5000 characters). Only what the
|
keys, enforces `required` fields and **rejects** a text value longer than 5000 characters — nothing is cut
|
||||||
|
or stored. The limit is fixed (no option today). The result is `{ success: false, reason: 'validation',
|
||||||
|
kind: 'too_long', field, label }`, and the visitor sees the **validation** text at that field ("Check the field
|
||||||
|
"{field}"." — Form messages → Form, `{field}` = the field's label) with every answer kept. Only what the
|
||||||
form defines reaches the database.
|
form defines reaches the database.
|
||||||
|
|
||||||
Rate limit: 5/min/IP by default (60 s window, the `form` counter is separate from search and MCP),
|
Rate limit: 5/min/IP by default (60 s window, the `form` counter is separate from search and MCP),
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ SiteSettings tabs (unnamed — flat data): **General** (`siteName`, `siteDescrip
|
|||||||
**Access:** SiteSettings has `read: () => true` — **the whole global, including fields from
|
**Access:** SiteSettings has `read: () => true` — **the whole global, including fields from
|
||||||
`siteSettingsFields`, is public** over REST/GraphQL (`/api/globals/site-settings`).
|
`siteSettingsFields`, is public** over REST/GraphQL (`/api/globals/site-settings`).
|
||||||
Keep nothing confidential there (use SiteIntegrations for that, `read`/`update` admin only).
|
Keep nothing confidential there (use SiteIntegrations for that, `read`/`update` admin only).
|
||||||
SiteSettings does not set `update` — Payload's default applies (any logged-in
|
SiteSettings `update` requires the **editor** role or higher (a plain `user` account must not change the brand,
|
||||||
user of an auth collection).
|
the homepage or the under-construction mode; without a `roles` field every logged-in account passes). Change it with
|
||||||
|
`ipalKit({ globalOverrides: { 'site-settings': { access: { update } } } })` (hooks.md).
|
||||||
|
|
||||||
## Front end — reading globals
|
## Front end — reading globals
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user