Skip to content

Commit

Permalink
Merge branch 'master' of github.com:payloadcms/payload
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikrut committed Dec 16, 2022
2 parents 1b8ab36 + 6580fc7 commit fc35d84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utilities/getEntityPolicies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function getEntityPolicies<T extends Args>(args: T): ReturnType<T> {

if (typeof accessResult === 'object' && !disableWhere) {
mutablePolicies[operation] = {
permission: !!(await getEntityDoc({ where: accessResult })),
permission: (id || type === 'global') ? !!(await getEntityDoc({ where: accessResult })) : true,
where: accessResult,
};
} else if (mutablePolicies[operation]?.permission !== false) {
Expand Down

0 comments on commit fc35d84

Please sign in to comment.