Closed davydovanton closed 6 years ago
That works for me! Especially since I see easy ways to compose rules with a DSL on top of this. :kissing_heart:
My next, and still unsolved, thought is: How do we model finer relationships, such as "user is group admin for X and project manager for Y", but I think I can come up with something on top of your kan
API and then we can merge.
done. You can use roles system from master
branch :)
https://github.com/davydovanton/kan#roles
:metal:
Thinking about modeling your abilities in a tree, but I might start that as a kan
sub-gem?! BTW, I still have the coolest authorization gem name waiting to become alive, so let me know if you want to change the gem name hahahaha! :joy: :beers:
Thanks, @apotonick for really good question:
https://twitter.com/apotonick/status/951359565198778368
I think we can define "role" for each abilities class and after that use it for detect right abilities for scope. For example:
After that we can initialize kan object:
And now, we can check can user do something or not:
WDYT?