Benachrichtigungen erweitert
Emails korrigiert
This commit is contained in:
@@ -64,7 +64,8 @@ export default defineEventHandler(async (event) => {
|
||||
showEmail: vis.showEmail === undefined ? true : Boolean(vis.showEmail),
|
||||
showPhone: vis.showPhone === undefined ? true : Boolean(vis.showPhone),
|
||||
// Address remains private by default
|
||||
showAddress: vis.showAddress === undefined ? false : Boolean(vis.showAddress)
|
||||
showAddress: vis.showAddress === undefined ? false : Boolean(vis.showAddress),
|
||||
showBirthday: vis.showBirthday === true
|
||||
}
|
||||
|
||||
mergedMembers.push({
|
||||
@@ -163,7 +164,8 @@ export default defineEventHandler(async (event) => {
|
||||
mergedMembers[matchedManualIndex].visibility = {
|
||||
showEmail: user.visibility.showEmail === undefined ? Boolean(vis.showEmail) : Boolean(user.visibility.showEmail),
|
||||
showPhone: user.visibility.showPhone === undefined ? Boolean(vis.showPhone) : Boolean(user.visibility.showPhone),
|
||||
showAddress: user.visibility.showAddress === undefined ? Boolean(vis.showAddress) : Boolean(user.visibility.showAddress)
|
||||
showAddress: user.visibility.showAddress === undefined ? Boolean(vis.showAddress) : Boolean(user.visibility.showAddress),
|
||||
showBirthday: user.visibility.showBirthday === undefined ? vis.showBirthday === true : user.visibility.showBirthday === true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -186,7 +188,8 @@ export default defineEventHandler(async (event) => {
|
||||
visibility: {
|
||||
showEmail: userVis.showEmail === undefined ? true : Boolean(userVis.showEmail),
|
||||
showPhone: userVis.showPhone === undefined ? true : Boolean(userVis.showPhone),
|
||||
showAddress: userVis.showAddress === undefined ? false : Boolean(userVis.showAddress)
|
||||
showAddress: userVis.showAddress === undefined ? false : Boolean(userVis.showAddress),
|
||||
showBirthday: userVis.showBirthday === true
|
||||
},
|
||||
notes: `Rolle(n): ${roles.join(', ')}`,
|
||||
source: 'login',
|
||||
@@ -226,7 +229,7 @@ export default defineEventHandler(async (event) => {
|
||||
const emailVisible = (isPrivilegedViewer || (isViewerAuthenticated && showEmail))
|
||||
const phoneVisible = (isPrivilegedViewer || (isViewerAuthenticated && showPhone))
|
||||
const addressVisible = (isPrivilegedViewer || (isViewerAuthenticated && showAddress))
|
||||
const birthdayVisible = (isPrivilegedViewer || (isViewerAuthenticated && (member.visibility && member.visibility.showBirthday !== undefined ? Boolean(member.visibility.showBirthday) : true)))
|
||||
const birthdayVisible = (isPrivilegedViewer || (isViewerAuthenticated && member.visibility?.showBirthday === true))
|
||||
|
||||
return {
|
||||
id: member.id,
|
||||
@@ -246,7 +249,7 @@ export default defineEventHandler(async (event) => {
|
||||
showEmail: visibility.showEmail === undefined ? true : Boolean(visibility.showEmail),
|
||||
showPhone: visibility.showPhone === undefined ? true : Boolean(visibility.showPhone),
|
||||
showAddress: visibility.showAddress === undefined ? false : Boolean(visibility.showAddress),
|
||||
showBirthday: visibility.showBirthday === undefined ? true : Boolean(visibility.showBirthday),
|
||||
showBirthday: visibility.showBirthday === true,
|
||||
// Privileged viewers (vorstand) always see contact fields
|
||||
email: emailVisible ? member.email : undefined,
|
||||
phone: phoneVisible ? member.phone : undefined,
|
||||
|
||||
Reference in New Issue
Block a user