ryanb / cancan

Authorization Gem for Ruby on Rails.
MIT License
6.27k stars 783 forks source link

skip_load_and_authorize_resource always raise ImplementationRemoved exception #465

Open potomak opened 12 years ago

potomak commented 12 years ago

Calling skip_load_resource or skip_authorize_resource an instance of ImplementationRemoved exception is raised: ok. The problem is that skip_load_and_authorize_resource include a call to skip_load_resource and a call to skip_authorize_resource raising the same exception. Result: you just can't skip loading and/or authorizing resources.

Note: this only happens in version 2.0

gamov commented 12 years ago

Yes. I agree with Ryan that it's clunky. However, I think it would be great if we could specify in Ability:

can :access, :shipments, :only => [:index, :show]

or

can :access, :shipments, :except=> [:destroy, :new]
ericboehs commented 12 years ago

I think he's removing them completely from 2.0. I simply appended except: :delete on my load_and_authorize_resource call like so:

load_and_authorize_resource except: :destroy
xhoy commented 10 years ago

Dear submitter, Since cancan/raynB hasn't been active for more than 6 months and no body else then ryam himself has commit permissions the cancan project is on a stand still. Since cancan has several issues including missing support for rails 4 cancan is moving forward to cancancan. More details on: #994

If your feel that your pull request or bug is still applicable (and hasn't been merged in to cancan) it would be really appreciated if you would resubmit it to cancancan (https://github.com/cancancommunity/cancancan)

We hope to see you on the other side!