use permission middleware

This commit is contained in:
Ulf Gebhardt 2025-04-06 03:55:31 +02:00
parent 52b582e54d
commit 8f6555250b
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 1 additions and 6 deletions

View File

@ -470,6 +470,7 @@ export default shield(
},
User: {
email: or(isMyOwn, isAdmin),
emailNotificationSettings: isMyOwn,
},
Report: isModerator,
},

View File

@ -382,12 +382,6 @@ export default {
return email
},
emailNotificationSettings: async (parent, params, context, resolveInfo) => {
const { user } = context
if (user.id !== parent.id) {
// Its not the own user
return []
}
return [
{
type: 'post',