Respect per-user visibility; only 'vorstand' overrides visibility; UI shows contactHidden per-member
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 47s

This commit is contained in:
Torsten Schulz (local)
2026-02-11 13:24:01 +01:00
parent ce5915a3bc
commit 141a15a6cb
3 changed files with 49 additions and 65 deletions

View File

@@ -64,9 +64,10 @@ export default defineEventHandler(async (event) => {
const visibility = body.visibility || body.visibilityPreferences || null
if (visibility && typeof visibility === 'object') {
user.visibility = user.visibility || {}
if (typeof visibility.showEmail === 'boolean') user.visibility.showEmail = visibility.showEmail
if (typeof visibility.showPhone === 'boolean') user.visibility.showPhone = visibility.showPhone
if (typeof visibility.showAddress === 'boolean') user.visibility.showAddress = visibility.showAddress
// Coerce values to booleans to be robust against string values from clients
if (visibility.showEmail !== undefined) user.visibility.showEmail = Boolean(visibility.showEmail)
if (visibility.showPhone !== undefined) user.visibility.showPhone = Boolean(visibility.showPhone)
if (visibility.showAddress !== undefined) user.visibility.showAddress = Boolean(visibility.showAddress)
}
// Handle password change