How to control field access with cancan

707 Views Asked by At

I have a Book model which has a cover field which is the path to an image that is uploaded.

But I want to restrict the uploading of the cover if a user is not a particular user level.

How do I do this with CanCan or should I use acl9 for this?

1

There are 1 best solutions below

1
On BEST ANSWER

CanCan can do this for you – check out this link: CanCan wiki: Custom Actions

Alternatively try checking out the attr_accessible docs with the new :as option. if this would work better for you?