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

[Demo] Leverage canAccess in CRM demo #10300

Merged
merged 3 commits into from
Oct 28, 2024
Merged

[Demo] Leverage canAccess in CRM demo #10300

merged 3 commits into from
Oct 28, 2024

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Oct 25, 2024

Problem

React Admin 5.3.0 introduced a better access control mechanism but the CRM demo still uses the old permissions.

Solution

Convert the usage of permissions to canAccess.

How To Test

  • Starts the demo

As an admin (the default)

  • Check that you can access the users admin menu
  • Check that you can access the sales pages
  • Note an email of a "simple" sale

As the "simple" sale

  • There is no Users menu item in the top right user menu dropdown
  • Trying to access any sales URL by typing it directly in the browser address bar should redirect to the /access-denied pag

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

Also, please make sure to read the contributing guidelines.

@djhi djhi added the RFR Ready For Review label Oct 25, 2024
@slax57 slax57 added this to the 5.3.2 milestone Oct 28, 2024
@slax57 slax57 merged commit 0d6c83e into master Oct 28, 2024
15 checks passed
@slax57 slax57 deleted the crm-can-access branch October 28, 2024 15:58
@slax57 slax57 changed the title Leverage canAccess in CRM demo [Demo] Leverage canAccess in CRM demo Oct 28, 2024
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