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:
Radosław Smoliński
2026-10-22 16:58:00 +02:00
co-authored by Claude Opus 5.5
parent 12fbd424a5
commit 10da62ea4c
10 changed files with 194 additions and 7 deletions
+1 -1
View File
@@ -67,5 +67,5 @@ fallback. `getNotificationTexts` resolwuje, co istnieje.
## Dostęp
Global ma `read: () => true` — teksty są publiczne (pokazywane użytkownikom
końcowym), więc front czyta je bez sesji. Inaczej niż SiteIntegrations
końcowym), więc front czyta je bez sesji. Zapis: `editor+`. Inaczej niż SiteIntegrations
(`read: isAdmin` — tam sekrety).