Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

problem with resource name #1

Closed
keulu-ing opened this issue Jun 4, 2019 · 3 comments · Fixed by #2
Closed

problem with resource name #1

keulu-ing opened this issue Jun 4, 2019 · 3 comments · Fixed by #2
Labels
bug Something isn't working

Comments

@keulu-ing
Copy link

keulu-ing commented Jun 4, 2019

Hi guys, nice lib but i have a strange behavior with it...

if i use the new <ResourceWithPermission> component, everything works fine except if i use a camelCased resource name.

<ResourceWithPermission name="users" ... > // ok
<ResourceWithPermission name="adminUsers" ... > // broken. Menu, edit, showing, listing, nothing work.

here is a sandbox for testing purpose.

https://codesandbox.io/s/simple-5hp4k (check the acl.js file for adjust.)

thanks

Edit :: After looking your component, i saw the problem... const prefix = name.toLowerCase();

@Kmaschta Kmaschta added the bug Something isn't working label Jun 4, 2019
@Kmaschta
Copy link
Contributor

Kmaschta commented Jun 4, 2019

Thanks for reporting!

I'm not sure what's the best option: allow camelCase prefix, or lower the string at the check step tho.

@Kmaschta
Copy link
Contributor

Kmaschta commented Jun 4, 2019

It should be fixed with ra-auth-acl@0.1.1

@keulu-ing
Copy link
Author

nice. it works. thx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants