-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix access.filter.*
passing listKey: undefined
#8122
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
session: context.session, | ||
list: list.listKey, | ||
context, | ||
} as any); // TODO: FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
session: context.session, | ||
listKey: list.listKey, | ||
context, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verbose, but, at least it type checks
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4d4ea09:
|
Co-authored-by: Daniel Cousens <dcousens@users.noreply.github.com>
Fixes #8121 where
access.filter.*
operations were being passedlist: list.listKey
instead oflistKey: list.listKey
.The typo fell through our types because we had an
as any
with the type being difficult to resolve.Prior to c740ba6 we had
@ts-ignore
for this check:keystone/packages/core/src/lib/core/access-control.ts
Lines 63 to 67 in 6c60565
And then with #7914 we changed it to
as any
and introduced the regression (as shown in the pull request diff).With this pull request, we resolve the types verbosely. Not ideal, but, it's better than the alternative.