mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-20 11:51:22 +00:00
use permission middleware
This commit is contained in:
parent
52b582e54d
commit
8f6555250b
@ -470,6 +470,7 @@ export default shield(
|
||||
},
|
||||
User: {
|
||||
email: or(isMyOwn, isAdmin),
|
||||
emailNotificationSettings: isMyOwn,
|
||||
},
|
||||
Report: isModerator,
|
||||
},
|
||||
|
||||
@ -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',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user