Skip to content

Commit

Permalink
adding Lock It Down section to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanb committed Feb 22, 2011
1 parent 3901cbe commit 79995e4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.rdoc
Expand Up @@ -77,6 +77,17 @@ If the user authorization fails, a <tt>CanCan::AccessDenied</tt> exception will
See {Exception Handling}[https://github.com/ryanb/cancan/wiki/exception-handling] for more information.


=== 4. Lock It Down

If you want to ensure authorization happens on every action in your application, add +check_authorization+ to your ApplicationController.

class ApplicationController < ActionController::Base
check_authorization
end

This will raise an exception if authorization is not performed in an action. If you want to skip this add +skip_authorization_check+ to a controller subclass. See {Ensure Authorization}[https://github.com/ryanb/cancan/wiki/Ensure-Authorization] for more information.


== Wiki Docs

* {Upgrading to 1.5}[https://github.com/ryanb/cancan/wiki/Upgrading-to-1.5]
Expand Down

0 comments on commit 79995e4

Please sign in to comment.