fixed permission bug

This commit is contained in:
Wyatt Johnson
2018-02-22 17:18:42 -07:00
parent 9ce94c97d0
commit cbf33b29fb
2 changed files with 4 additions and 5 deletions
+3
View File
@@ -91,6 +91,9 @@ decorateWithPermissionCheck(
if (user && user.id === id) {
return true;
}
// We don't return false because we want to fallthrough to the permission
// check if the custom check fails.
}
);
+1 -5
View File
@@ -88,11 +88,7 @@ const wrapCheckPermissions = (
wrapCheck(
typeResolver,
field,
(obj, args, ctx) => {
if (checkPermissions(ctx, permissions)) {
return false;
}
},
(obj, args, ctx) => !checkPermissions(ctx, permissions),
skipFieldResolver
);