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 authorize_resource! #4

Open
abitdodgy opened this issue Feb 13, 2014 · 4 comments
Open

Support for authorize_resource! #4

abitdodgy opened this issue Feb 13, 2014 · 4 comments
Milestone

Comments

@abitdodgy
Copy link

It would be nice not having to call authorize! in every controller method. Do you have any plans to include this functionality?

I'm curious, how much work/how complicated is it?

I might be out of my depth, but I'm willing to give it a crack if you think it's useful, and if I can get some guidance.

@pokonski
Copy link
Contributor

Hi!

Absolutely, forgot about this actually :) I will add the before_filter support just like in CanCan. Though most likely this will be in a wrapper gem access-granted-rails to keep the core framework-agnostic.

Thanks for spotting this and I hope access-granted will make your life easier.

@pokonski pokonski added this to the 0.2 milestone Feb 14, 2014
@abitdodgy
Copy link
Author

Great to hear. Just an FYI, I was never a big fan of the load_and_authorize_resource!. I always had the need to use scopes and custom queries, which never played well with CanCan. authorize_resource!, on the other hand, was great, until it stopped working for me in Rails 4.

@pokonski
Copy link
Contributor

You are right, I don't want to load resources. Too much overwriting anyway.

On 14/02/2014, Mohamad El-Husseini [email protected] wrote:

Great to hear. Just an FYI, I was never a big fan of the
load_and_authorize_resource!. I always had the need to use scopes and
custom queries, which never played well with CanCan. authorize_resource!,
on the other hand, was great, until it stopped working for me in Rails 4.


Reply to this email directly or view it on GitHub:
#4 (comment)

Piotr Okoński
[email protected] | +48 792 097 151

@winston
Copy link

winston commented Nov 19, 2015

You are right, I don't want to load resources.

Sorry. Does this mean that bringing in load_and_authorize_resource is out of the question?
Am asking because I use that pretty often. Thanks!

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

No branches or pull requests

3 participants