I really like how canard simplifies authorization and roles. However, for my particular application I have been agonizing over role_model's inability to scope a role to a particular resource. I also have nightmares in my sleep thinking about when I need to add a new role and migrate all the bitmasks over. shudder
I'd like to try out rolify but I don't want to give up canard!
After looking things over, I think it might be possible to support rolify in canard. For example, most of the stuff in ::acts_as_user and the Adapters aren't necessary, because rolify already defines scopes for ActiveRecord and Mongoid. This stuff could conditionally be loaded only if the model is_a? RoleModel or perhaps via a configuration option.
If this sounds plausible/interesting to you, I'd be willing to give it a shot.
I really like how canard simplifies authorization and roles. However, for my particular application I have been agonizing over role_model's inability to scope a role to a particular resource. I also have nightmares in my sleep thinking about when I need to add a new role and migrate all the bitmasks over. shudder
I'd like to try out rolify but I don't want to give up canard!
After looking things over, I think it might be possible to support rolify in canard. For example, most of the stuff in
::acts_as_user
and the Adapters aren't necessary, because rolify already defines scopes for ActiveRecord and Mongoid. This stuff could conditionally be loaded only if the modelis_a? RoleModel
or perhaps via a configuration option.If this sounds plausible/interesting to you, I'd be willing to give it a shot.