fix: add cms.c2sgmbh.de to CORS/CSRF and save isSuperAdmin to JWT

- Add pl.c2sgmbh.de and cms.c2sgmbh.de to cors and csrf arrays
  to fix Forbidden error on PATCH requests from these domains
- Add saveToJWT: true to isSuperAdmin field so multiTenantPlugin
  correctly grants super admins access to all tenants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martin Porwoll 2026-02-25 12:32:51 +00:00
parent bd174c8569
commit 47c6500679
2 changed files with 5 additions and 0 deletions

View file

@ -58,6 +58,7 @@ export const Users: CollectionConfig = {
type: 'checkbox',
label: 'Super Admin',
defaultValue: false,
saveToJWT: true,
access: {
read: superAdminFieldAccess,
create: superAdminFieldAccess,

View file

@ -193,6 +193,8 @@ export default buildConfig({
'https://porwoll.de',
'https://www.porwoll.de',
'https://pl.porwoll.tech',
'https://pl.c2sgmbh.de',
'https://cms.c2sgmbh.de',
],
// CSRF Protection
csrf: [
@ -205,6 +207,8 @@ export default buildConfig({
'https://porwoll.de',
'https://www.porwoll.de',
'https://pl.porwoll.tech',
'https://pl.c2sgmbh.de',
'https://cms.c2sgmbh.de',
],
collections: [
Users,