fix(tenants): make SMTP password field visible in admin panel

neverReadable blocked the field everywhere including the admin UI.
Changed to allow read for authenticated users only, so the field
shows in admin but stays hidden in unauthenticated API responses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martin Porwoll 2026-02-16 16:19:09 +00:00
parent 9bb041bd7c
commit 0c222b9aa9

View file

@ -220,7 +220,7 @@ export const Tenants: CollectionConfig = {
description: 'Leer lassen um bestehendes Passwort zu behalten',
},
access: {
read: neverReadable, // Passwort nie in API-Response
read: ({ req }) => !!req.user, // Admin kann lesen, API ohne Auth nicht
},
hooks: {
beforeChange: [