Only admins are allowed to query all notifications

This commit is contained in:
Robert Schäfer 2019-04-05 02:23:27 +02:00
parent 97d9b6d772
commit bb3a8525db

View File

@ -44,6 +44,7 @@ const isAuthor = rule({ cache: 'no_cache' })(async (parent, args, { user, driver
// Permissions
const permissions = shield({
Query: {
Notification: isAdmin,
statistics: allow,
currentUser: allow,
Post: or(onlyEnabledContent, isModerator)