casbin-rs icon indicating copy to clipboard operation
casbin-rs copied to clipboard

Start to make examples

Open 0x8f701 opened this issue 5 years ago • 4 comments

It'll help the developpers a lot if we can add more examples like what actix-web has done: https://github.com/actix/examples

Currently we don't have enough docs. I hope me or anyone else can find time to add them.

But at the same time we can already start to prepare some examples like:

  1. actix-web + casbin example with fileadapter
  2. actix-web + casbin example with diesel-adapter
  3. actix-web + casbin example using CachedEnforcer (default cache) ...

Maybe we can also add some examples on other web frameworks.

I added an repo if anyone wants to contribute.

https://github.com/casbin-rs/examples

0x8f701 avatar Mar 01 '20 18:03 0x8f701

I've already started the second option. It's not finished, since I faced some problems in the diesel-adapter. After releasing version 0.3.0 it's more possible to be able to finalize it.

omid avatar Mar 02 '20 11:03 omid

@omid don't hesitate if you have met any problems.

0x8f701 avatar Mar 02 '20 11:03 0x8f701

@GopherJ PR is created @ https://github.com/casbin-rs/examples/pull/2

omid avatar Mar 02 '20 18:03 omid

actix-web + casbin example with diesel-adapter, using CachedEnforcer https://github.com/casbin-rs/examples/tree/master/actix-middleware-example

hackerchai avatar Aug 31 '20 15:08 hackerchai