Permalink
Browse files

adding Lock It Down section to readme

  • Loading branch information...
1 parent 3901cbe commit 79995e43090849b72e147258a6c9e5cfc54226b4 @ryanb committed Feb 22, 2011
Showing with 11 additions and 0 deletions.
  1. +11 −0 README.rdoc
View
11 README.rdoc
@@ -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]

0 comments on commit 79995e4

Please sign in to comment.