ryanb/cancan — Issue #508: Has_many through, per-item abilities
Author: scottkf
Created: 2011-11-08 13:01:06+00:00
State: open

If I have a HMT (Articles <-> Categories) and I want a certain role to be able to only change an Article's categories, how would the permissions be setup? Likewise a certain role should only be able to read an Article's categories and not change it

I've tried:

can :read, Article, :categories
ability.can?(:read, @article.categories) => false

That doesn't work. Is this possible?