diff --git a/website/server/controllers/api-v3/quests.js b/website/server/controllers/api-v3/quests.js index bdf567ce41..88b68bd088 100644 --- a/website/server/controllers/api-v3/quests.js +++ b/website/server/controllers/api-v3/quests.js @@ -80,7 +80,7 @@ api.inviteToQuest = { 'party._id': group._id, _id: { $ne: user._id }, }) - .select('auth.facebook auth.google auth.local preferences.emailNotifications preferences.pushNotifications preferences.language profile.name pushDevices webhooks') + .select('auth preferences.emailNotifications preferences.pushNotifications preferences.language profile.name pushDevices webhooks') .exec(); group.markModified('quest'); diff --git a/website/server/controllers/api-v3/user.js b/website/server/controllers/api-v3/user.js index 27d8af337b..d46b72c61c 100644 --- a/website/server/controllers/api-v3/user.js +++ b/website/server/controllers/api-v3/user.js @@ -280,7 +280,10 @@ api.deleteUser = { if (user.auth.local.hashed_password && user.auth.local.email) { const isValidPassword = await passwordUtils.compare(user, password); if (!isValidPassword) throw new NotAuthorized(res.t('wrongPassword')); - } else if ((user.auth.facebook.id || user.auth.google.id) && password !== DELETE_CONFIRMATION) { + } else if ( + (user.auth.facebook.id || user.auth.google.id || user.auth.apple.id) + && password !== DELETE_CONFIRMATION + ) { throw new NotAuthorized(res.t('incorrectDeletePhrase', { magicWord: 'DELETE' })); } @@ -366,6 +369,7 @@ api.getUserAnonymized = { delete user.auth.local; delete user.auth.facebook; delete user.auth.google; + delete user.auth.apple; } delete user.newMessages; delete user.profile; diff --git a/website/server/libs/invites/index.js b/website/server/libs/invites/index.js index d389546b3b..58474510fb 100644 --- a/website/server/libs/invites/index.js +++ b/website/server/libs/invites/index.js @@ -155,6 +155,7 @@ async function inviteByEmail (invite, group, inviter, req, res) { { 'auth.local.email': invite.email }, { 'auth.facebook.emails.value': invite.email }, { 'auth.google.emails.value': invite.email }, + { 'auth.apple.emails.value': invite.email }, ], }) .select({ _id: true, 'preferences.emailNotifications': true })