refine
refine copied to clipboard
[BUG] Casbin example not working
Describe the bug Casbin is not working when flowing from the example.
To Reproduce Just flowing from the document: https://refine.dev/docs/guides-and-concepts/access-control/#casbin Steps to reproduce the behavior:
- install casbin
- write access control provider
The node-casbin is just for the backend, not the fronted. So there're errors when webpack building.
Hey @polly3d, Thank you for information. As soon as possible we'll update the casbin example. Right now we are very busy, we would be very happy if you would like to open a PR and contribute to us 🚀
I would like to work on this issues. Can you assign this issue to me?
I would like to work on this issues. Can you assign this issue to me?
We'll look forward to your contribution 🚀
Hey @salihozdemir! I fixed all the errors raised by webpack in Refine Casbin Example app.
Change I made -
- Upgraded the webpack to the latest version i.e. 5.0.1
- Reason: webpack 4 does not support the nullish coalescing and optional chaining
- Uses the react-app-rewired package for overriding the webpack config to support polyfills.
- Reason: app created using
create-react-appdoes not support the webpack config overriding and for that, we need react-app-rewired
- Reason: app created using
Here is the updated app - site
Hey @amit-ksh, First, sorry for my late response I missed the notification. Great job! 🎉 We can't wait to merge. Could you want to open a PR?
I just wanted to confirm that I have to make changes in the docs right?
Our expectation is docs and example. The example file is in here. You can refer to this document to learn how to run examples in refine project. Also, you can find how to run document.
OK! I'll try to create PR as soon as possible.
Thank you @amit-ksh 🎁