Lock down injected users, 2FA slug, forms and globals writes
- Injected auth collection with roles: admins manage all accounts, others only themselves (Payload's default let any account edit or delete any other) - 2FA defaults to the resolved auth collection instead of 'users' - SiteSettings, CookieSettings, Notifications, Forms: write needs editor+; form Emails tab readable by editor+ only Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
12fbd424a5
commit
10da62ea4c
@@ -298,6 +298,11 @@ wysyła przez `submitForm` (server action → Local API), więc to go nie dotycz
|
||||
`forms: { formSubmissionOverrides: { access: { create: () => true } } }` — wtedy
|
||||
zabezpieczenia `submitForm` na tej drodze nie działają.
|
||||
|
||||
**Formularze edytuje tylko `editor+`.** Kolekcja `forms` jest publiczna do odczytu (pola renderują
|
||||
formularz), ale `create`/`update`/`delete` i odczyt zakładki Emails (odbiorcy, BCC) wymagają roli
|
||||
`editor` lub `admin` — konto `user` nie dopisze sobie BCC do każdego zgłoszenia. Nadpisanie:
|
||||
`forms: { formOverrides: { access: { … } } }`.
|
||||
|
||||
Walidacja jest istotna, bo server action to publiczny endpoint — da się go wołać
|
||||
z pominięciem formularza. Plugin ładuje definicję formularza i: odrzuca nieznane
|
||||
klucze, wymusza pola `required`, tnie długość (5000 znaków). Do bazy trafia tylko
|
||||
|
||||
Reference in New Issue
Block a user