casbin / dart-casbin

An authorization library that supports access control models like ACL, RBAC, ABAC in Dart/Flutter
https://casbin.org
Apache License 2.0
36 stars 13 forks source link

[Question] Dart implementation - ACL #4

Closed santhoshivan23 closed 3 years ago

santhoshivan23 commented 3 years ago

I can see a lot of interdependencies between modules(node-casbin reference). Just wanted to ask if there's an efficient way to start implementing ACL. The barebones are already set-up.

hsluoyz commented 3 years ago

@santhoshivan23 can you be more specific? I don't know Dart a lot, but it's inconvenient for Dart to implement the interdependencies?

hsluoyz commented 3 years ago

I will also involve the original code author here: @KNawm

santhoshivan23 commented 3 years ago

@hsluoyz I meant it would be great if we have a chronological sequence of modules that's to be followed for ACL. How was it initially implemented in jCasbin or node-casbin? @KNawm I can see that the barebones are more like a replica of node-casbin implementation. Willing to know your thoughts as well on how to begin!

hsluoyz commented 3 years ago

@santhoshivan23 you can definitely regard the git history of jCasbin or Node-Casbin as the "chronological sequence of modules". Basically, you need to implement "request", "policy", "matcher", "effect" to have a basic ACL model support.

KNawm commented 3 years ago

@hsluoyz I meant it would be great if we have a chronological sequence of modules that's to be followed for ACL. How was it initially implemented in jCasbin or node-casbin? @KNawm I can see that the barebones are more like a replica of node-casbin implementation. Willing to know your thoughts as well on how to begin!

Like @hsluoyz said, the Git history is a great starting point. The structure of the project is taken from the node-casbin implementation but I would suggest also taking a look at other implementations for inspiration. If you look closely you will find some things that are different from the node-casbin implementation, most of those things are like that because of the differences in the language so beware of that. If you need more help just ping me I'm happy to help!

santhoshivan23 commented 3 years ago

@KNawm Sure. I'll look into it!

santhoshivan23 commented 3 years ago

@KNawm I've opened a PR with some basic barebones and some enhancements specific to Dart. It would be really great if you can review it!

hsluoyz commented 3 years ago

@KNawm sorry to inform you so late but the GSoC idea submission deadline is in nearly 4 hours, can you add your idea about Dart-Casbin to this repo: https://github.com/casbin/SummerOfCode2021 via PR? Thanks!

hsluoyz commented 3 years ago

Already done: https://github.com/casbin/SummerOfCode2021#casbin-for-dart