nathanl / authority

*CURRENTLY UNMAINTAINED*. Authority helps you authorize actions in your Rails app. It's ORM-neutral and has very little fancy syntax; just group your models under one or more Authorizer classes and write plain Ruby methods on them.
MIT License
1.21k stars 67 forks source link

help with ensure_authorization_performed #92

Closed garyfoster closed 9 years ago

garyfoster commented 9 years ago

I really like the ensure_authorization_performed method that I can add to my application controller to ensure I'm securing all my controller actions. However, I am having trouble figuring out how to add exceptions, for example, there is one action in one controller that I want to add an exception for. I can see that I can do except: :create but how would I add exception for the :create action only on a specific controller?

nathanl commented 9 years ago

Hi! It's just a method, so you don't have to call it on ApplicationController; you can call it individually in different controllers with different arguments.

garyfoster commented 9 years ago

Ah, I should have realized that. Thanks!