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
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 47s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user