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

Simplify useConfigureAdminRouterFromChildren permissions #7642

Merged

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented May 5, 2022

Fixes #7637

@djhi djhi added the RFR Ready For Review label May 5, 2022
@djhi djhi added this to the 4.0.3 milestone May 5, 2022
@vercel vercel bot temporarily deployed to Preview – react-admin May 5, 2022 09:45 Inactive
@@ -43,7 +43,7 @@ import { useResourceDefinitionContext } from './useResourceDefinitionContext';
export const useConfigureAdminRouterFromChildren = (
children: AdminChildren
): RoutesAndResources & { status: AdminRouterStatus } => {
const permissions = usePermissionsWithLogout();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usePermissions already handle the case when there is no authProvider

Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works like a charm 🙂

@fzaninotto fzaninotto merged commit dc6bce6 into master May 5, 2022
@fzaninotto fzaninotto deleted the fix-use-configure-admin-router-from-children-permissions branch May 5, 2022 10:35
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.

Cannot log in to the e-commerce demo
3 participants