Skip to content
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

Add access control to <DeleteButton> #10226

Merged
merged 4 commits into from
Oct 1, 2024

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Sep 20, 2024

Problem

Showing the DeleteButton depending on users rights requires a lot of code.

Solution

Do it automatically when the authProvider supports canAccess.
The diff looks big but that mainly indentation changes as I had to wrap many tests inside a ResourceContextProvider

How To Test

Added stories for the button

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Part of #10222

@djhi djhi added the RFR Ready For Review label Sep 20, 2024
Base automatically changed from access-control-buttons to access-control-resources October 1, 2024 16:00
@fzaninotto fzaninotto merged commit b569075 into access-control-resources Oct 1, 2024
14 checks passed
@fzaninotto fzaninotto deleted the access-control-delete-buttons branch October 1, 2024 16:11
@fzaninotto fzaninotto added this to the 5.3.0 milestone Oct 1, 2024
@fzaninotto fzaninotto mentioned this pull request Oct 1, 2024
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants