Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for rolify? #12

Open
dwbutler opened this issue Apr 24, 2013 · 0 comments
Open

Support for rolify? #12

dwbutler opened this issue Apr 24, 2013 · 0 comments

Comments

@dwbutler
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant