fix(core): pass meta to useButtonCanAccess in useDeleteButton#7316
Closed
Aaron3312 wants to merge 1 commit intorefinedev:mainfrom
Closed
fix(core): pass meta to useButtonCanAccess in useDeleteButton#7316Aaron3312 wants to merge 1 commit intorefinedev:mainfrom
Aaron3312 wants to merge 1 commit intorefinedev:mainfrom
Conversation
🦋 Changeset detectedLatest commit: a9f9cdf The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This comment was marked as spam.
This comment was marked as spam.
alicanerdurmaz
requested changes
Mar 4, 2026
Member
alicanerdurmaz
left a comment
There was a problem hiding this comment.
Hi, thanks for improving Refine.
Everything looks great except changeset file names should be auto-generated.
Member
|
this commit shouldn't be in this PR |
5 tasks
useDeleteButton was not forwarding the meta prop to useButtonCanAccess, causing access control checks that rely on meta params (e.g. tenant-aware permissions) to receive undefined instead of the provided meta values. Other button hooks (navigation-button) already pass meta correctly. This aligns useDeleteButton with the same pattern. Fixes refinedev#7285
b5e37b8 to
a9f9cdf
Compare
Contributor
Author
|
Thanks for the feedback! I've fixed both issues:
|
alicanerdurmaz
approved these changes
Mar 16, 2026
Member
|
Thank you very much for your effort, @Aaron3312, but we are closing this PR in favor of this PR. We did this because the other PR was opened earlier. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Bugs / Features
What is the current behavior?
useDeleteButtondoes not forward themetaprop touseButtonCanAccess, so access control checks viauseCanreceiveundefinedforparams.meta. This breaks any custom access control rule that relies onmeta(e.g. tenant-aware permission systems).What is the new behavior?
meta: props.metais now passed touseButtonCanAccess, matching the same pattern already used bynavigation-button. Access control checks now receive the correctmetaparams.fixes #7285
Notes for reviewers
One-line fix. The
navigation-buttonhook already does this correctly at line 60 — this just applies the same pattern todelete-button.