fixed permission bug

This commit is contained in:
Wyatt Johnson committed 2018-02-22 17:18:42 -07:00
1 parent 9ce94c97d0
commit cbf33b29fb
2 files changed
+4 -5

No files matched your search

+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
);