refine icon indicating copy to clipboard operation
refine copied to clipboard

[BUG] Casbin example not working

Open polly3d opened this issue 3 years ago • 1 comments

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:

  1. install casbin
  2. write access control provider

The node-casbin is just for the backend, not the fronted. So there're errors when webpack building.

polly3d avatar Sep 15 '22 08:09 polly3d

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 🚀

salihozdemir avatar Sep 15 '22 09:09 salihozdemir

I would like to work on this issues. Can you assign this issue to me?

amit-ksh avatar Oct 06 '22 09:10 amit-ksh

I would like to work on this issues. Can you assign this issue to me?

We'll look forward to your contribution 🚀

salihozdemir avatar Oct 06 '22 09:10 salihozdemir

Hey @salihozdemir! I fixed all the errors raised by webpack in Refine Casbin Example app.

Change I made -

  1. Upgraded the webpack to the latest version i.e. 5.0.1
    • Reason: webpack 4 does not support the nullish coalescing and optional chaining
  2. Uses the react-app-rewired package for overriding the webpack config to support polyfills.
    • Reason: app created using create-react-app does not support the webpack config overriding and for that, we need react-app-rewired

Here is the updated app - site

amit-ksh avatar Oct 08 '22 04:10 amit-ksh

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?

salihozdemir avatar Oct 12 '22 09:10 salihozdemir

I just wanted to confirm that I have to make changes in the docs right?

amit-ksh avatar Oct 12 '22 09:10 amit-ksh

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.

salihozdemir avatar Oct 12 '22 10:10 salihozdemir

OK! I'll try to create PR as soon as possible.

amit-ksh avatar Oct 12 '22 10:10 amit-ksh

Thank you @amit-ksh 🎁

omeraplak avatar Oct 14 '22 09:10 omeraplak