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

User abilities don't include guest abilities #9

Open
ssexton71 opened this issue Oct 10, 2012 · 1 comment
Open

User abilities don't include guest abilities #9

ssexton71 opened this issue Oct 10, 2012 · 1 comment

Comments

@ssexton71
Copy link

I ended up not using Canard for a recent project because the "additive" nature of abilities does not include guest abilities.

I think the behavior should be, for example: guest, user, manager, admin
Instead it is: user, manager, admin

So any abilities defined for guest have to be duplicated in user. Not very DRY. While I realize this is a breaking change, to be perfectly honest, I can't think of any real world examples where a user would be denied from doing something that a guest can do.

@james2m
Copy link
Owner

james2m commented Oct 11, 2012

Signup and signin pages spring to mind. But point taken. I would consider adding it as a configuration option, but wouldn't want to trade potential DRYness for flexibility. Out of 5 projects I'm using Canard in only 1 would benefit from this. So I see the potential but not at the expense of a limitation. How about;

  acts_as_user roles: [...], prepend_guest: true

With prepend_guest defaulting to false.

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

2 participants