<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>generators/simple_roles/templates/migration.rb</filename>
    </added>
    <added>
      <filename>lib/identity/add_or_make_admin_user.rb</filename>
    </added>
    <added>
      <filename>lib/identity/cookie_token.rb</filename>
    </added>
    <added>
      <filename>lib/identity/nil_roles.rb</filename>
    </added>
    <added>
      <filename>lib/identity/password.rb</filename>
    </added>
    <added>
      <filename>lib/identity/simple_roles.rb</filename>
    </added>
    <added>
      <filename>lib/trustification/email_validation.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -67,6 +67,4 @@ module AuthenticationTestHelper
     ctrlr.stub!(:get_authorization).and_return(val)
   end
   &lt;% end %&gt;
-
 end
-</diff>
      <filename>generators/authenticated/templates/authentication_test_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ protected
   #    Use req[:for], not current_user, to make your decision
   # * :to =&gt; the requested action
   # * :on =&gt; the resource or resources request will act on
-  # * :extra =&gt; any extra information passed by the access control request
+  # * :context =&gt; any extra information passed by the access control request
   #
   # get_authorization can return
   # * nil/false will raise AccessDenied (demands) or deny access (requests)
@@ -40,3 +40,23 @@ protected
     &lt;%= model_name %&gt;.is_a?(&lt;%= class_name %&gt;)
   end
 end
+
+User.class_eval do
+protected
+  #
+  # Most roles/privileges are assigned explicitly: designating a user to be a
+  # moderator, granting 'push' permissions to a newly-hired programmer.
+  #
+  # Some are granted and revoked automatically, though.  Many sites don't make a
+  # user active until they've verified their email address.  A communal blog
+  # might not allow 'front-page posting' for the first month after joining.
+  #
+  # reconcile_privileges! lets the Policy module assign or revoke privileges
+  # based on the subject's current state.
+  #
+  def reconcile_privileges! occasion='', *more_info
+    logger.info &quot;Reassigning privileges for #{self.class} id #{self.id}: #{occasion} #{more_info.to_json}&quot;
+    # user is active if and only if email is verified.
+    # set_role!(:active, email_verified?)
+  end
+end</diff>
      <filename>generators/authenticated/templates/security_policy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ class SessionsController &lt; ApplicationController
     begin
       login_by_password! params[:login], params[:password]
     rescue Exception =&gt; error
-      handle_signin_error error
+      handle_login_error error
     else # success!
       remember_me_flag = (params[:remember_me] == &quot;1&quot;)
       handle_remember_cookie! remember_me_flag
@@ -46,4 +46,22 @@ protected
     logger.warn &quot;Failed login for '#{params[:login]}' from #{request.remote_ip} at #{Time.now.utc}: #{error}&quot;
   end
 
+  # react to login failures
+  def handle_login_error error
+    logout_keeping_session!
+    begin
+      raise error
+    rescue AccountNotActive =&gt; error
+      log_failed_signin error
+      redirect_back_or_default('/')
+    rescue AccountNotFound, BadPassword =&gt; error
+      log_failed_signin error
+      try_again
+    rescue AuthenticationError, SecurityError =&gt; error
+      log_failed_signin error
+      redirect_back_or_default('/')
+    end
+    # general exceptions are uncaught
+  end
+
 end</diff>
      <filename>generators/authenticated/templates/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -55,8 +55,8 @@ describe SessionsController do
       describe &quot;successfully&quot; do
         it_should_behave_like &quot;successful login&quot;
         # password
-#        it &quot;tries login&quot;                                   do controller.should_receive(:login_by_password!).with('test_login', 'monkey'); controller.stub!(:current_user).and_return(@user); do_login end
-#        it &quot;becomes logged in through the front door&quot;      do controller.should_receive(:become_logged_in_as!).with(@user);               controller.stub!(:current_user).and_return(@user); do_login end
+        it &quot;tries login&quot;                                   do controller.should_receive(:login_by_password!).with('test_login', 'monkey'); controller.stub!(:current_user).and_return(@user); do_login end
+        it &quot;becomes logged in through the front door&quot;      do controller.should_receive(:become_logged_in_as!).with(@user);               controller.stub!(:current_user).and_return(@user); do_login end
         it &quot;asks to authenticate me&quot;                       do &lt;%= class_name %&gt;.should_receive(:authenticate_by_password).with('test_login', 'monkey'); do_login end
         # cookies
         it &quot;sets cookie with remember me checked&quot;          do controller.should_receive(:handle_remember_cookie!).with(true);  do_login(:remember_me =&gt; &quot;1&quot;);   end</diff>
      <filename>generators/authenticated/templates/spec/controllers/sessions_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -40,7 +40,7 @@ describe &lt;%= model_controller_class_name %&gt;Controller do
       it &quot;welcomes me nicely&quot;                    do do_signup; response.flash[:notice].should =~ /Thank.*sign.*up/i   end
       # auto login if authorized to do so
       it &quot;logs me in&quot;                            do controller.should_receive(:become_logged_in_as).with(@user).and_return(true);  do_signup;   end
-      it &quot;only logs me in if authorized&quot;         do controller.should_receive(:get_authorization).with({:for =&gt; @user, :to =&gt; :login,:on=&gt;nil,:extra=&gt;nil}).and_return(true);  do_signup; end
+      it &quot;only logs me in if authorized&quot;         do controller.should_receive(:get_authorization).with({:for =&gt; @user, :to =&gt; :login,:on=&gt;nil,:context=&gt;nil}).and_return(true);  do_signup; end
       it &quot;doesn't fail if not authorized&quot;        do stub_auth!(controller, false); lambda{ do_signup }.should_not raise_error end
       it &quot;does fail if other errors&quot;             do controller.stub!(:get_authorization).and_raise(&quot;frobnozz&quot;);    lambda{ do_signup }.should raise_error(&quot;frobnozz&quot;) end
     end</diff>
      <filename>generators/authenticated/templates/spec/controllers/users_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -44,7 +44,7 @@ describe Authentication do
       lambda{ b_l_i_a! false}.should raise_error(AuthenticationError)
     end
     it &quot;asks for authorization&quot; do
-      @mock_controller.should_receive(:get_authorization).at_least(:once).with({:for =&gt; @&lt;%= model_name %&gt;, :to =&gt; :login, :on =&gt; nil, :extra =&gt; nil}).and_return(true)
+      @mock_controller.should_receive(:get_authorization).at_least(:once).with({:for =&gt; @&lt;%= model_name %&gt;, :to =&gt; :login, :on =&gt; nil, :context =&gt; nil}).and_return(true)
       b_l_i_a! @&lt;%= model_name %&gt;
     end
     it &quot;raises the given error if authorization fails&quot; do
@@ -58,7 +58,7 @@ describe Authentication do
   describe &quot;become_logged_in_as!&quot; do
     def b_l_i_a_no_raise(u) @mock_controller.send(:become_logged_in_as, u) end
     it &quot;asks for authorization&quot; do
-      @mock_controller.should_receive(:get_authorization).at_least(:once).with({:for =&gt; @&lt;%= model_name %&gt;, :to =&gt; :login, :on =&gt; nil, :extra =&gt; nil}).and_return(true)
+      @mock_controller.should_receive(:get_authorization).at_least(:once).with({:for =&gt; @&lt;%= model_name %&gt;, :to =&gt; :login, :on =&gt; nil, :context =&gt; nil}).and_return(true)
       b_l_i_a_no_raise @&lt;%= model_name %&gt;
     end
     it &quot;raises an AuthenticationError unless &lt;%= model_name %&gt;&quot;  do</diff>
      <filename>generators/authenticated/templates/spec/lib/authentication_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 class &lt;%= class_name %&gt; &lt; ActiveRecord::Base
-  security_components :identity =&gt; [:password, :cookie_token]
+  security_components :security_policy, :identity =&gt; [:password, :cookie_token, :simple_roles]
 
   # Validation constants are in config/initializers/rest_auth_config.rb
   validates_presence_of     :login</diff>
      <filename>generators/authenticated/templates/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,5 @@
 %w[
   security_components
-  authentication
-  access_control
-  identity
 ].each do |f|
   require f
 end</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@ protected
   # Call with positional args (assumes current_user as the subject)
   #   authorized? action, resource, *args
   # or call with options
-  #   authorized? :for =&gt; user, :to =&gt; action, :on =&gt; resource, :extra =&gt; anything_extra
+  #   authorized? :for =&gt; user, :to =&gt; action, :on =&gt; resource, :context =&gt; any_extra_context
   #
   # Examples:
   #   authorized? :for =&gt; user, :to =&gt; :log_in_as_user # check if user is activated
@@ -45,7 +45,7 @@ protected
   # Best for use with before_filter
   #
   # Fills in request from controller action params:
-  #   :for =&gt; current_user, :to =&gt; action, :on =&gt; self.class, :extras =&gt; params
+  #   :for =&gt; current_user, :to =&gt; action, :on =&gt; self.class, :context =&gt; params
   #
   # If user is not authorized, raises an AccessDenied exception; see
   # handle_access_denied, below.
@@ -56,7 +56,7 @@ protected
     decision = get_authorization_with_args :for =&gt; current_user,
       :to =&gt; params[:action],
       :on =&gt; resource_guess,
-      :extras =&gt; params
+      :context =&gt; params
     raise(decision||AccessDenied) if is_denial?(decision)
     decision
   end
@@ -71,10 +71,11 @@ protected
   end
   def parse_access_req_args *args
     req = args.extract_options!
+    req.assert_valid_keys(:for, :to, :on, :context)
     if args
       # ordered params
-      action, resource, extra = args
-      req.reverse_merge! :to =&gt; action, :on =&gt; resource, :extra =&gt; extra
+      action, resource, context = args
+      req.reverse_merge! :to =&gt; action, :on =&gt; resource, :context =&gt; context
     end
     # request on behalf of current user if none specified
     # (note that an explicit :for =&gt; nil or false is left untouched)</diff>
      <filename>lib/access_control.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,18 +1,5 @@
 module Identity
 
-  #
-  # Define any user roles here -- eg :moderator or :admin.
-  #
-  # This example gives every user two roles: :user and :active, and no other.
-  #
-  # This is just a stub called by the authorization routines.  Add logic over
-  # there if you want these roles to do anything.  For more complex needs, see
-  # notes/RailsPlugins.txt for role-based security plugins
-  #
-  def has_role? role
-    [:user, :active].include? role
-  end
-
   module ModelClassMethods
     #
     # Create a secure one-way hash of the input.
@@ -32,6 +19,23 @@ module Identity
     end
   end
 
+  #
+  # Define any user roles here -- eg :moderator or :admin.
+  #
+  # This example gives every user two roles: :user and :active, and no other.
+  #
+  # This is just a stub called by the authorization routines.  Add logic over
+  # there if you want these roles to do anything.  For more complex needs, see
+  # notes/RailsPlugins.txt for role-based security plugins
+  #
+  def has_role? role
+    [:user, :active].include? role
+  end
+
+  
+  #
+  # Validations
+  #
   # restful-authentication/notes/Tradeoffs.txt has more information on how these
   # validation formats were chosen.
 </diff>
      <filename>lib/identity.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,6 +23,7 @@ end
 
 def security_components(*args)
   SecurityComponents.walk_reqs(args).each do |concern|
-    include concern.to_s.classify.constantize
+    # require_dependency concern.to_s # causes double includes ??
+    include            concern.to_s.camelize.constantize
   end
 end</diff>
      <filename>lib/security_components.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,74 @@
 h2. Authorization
 
+h2. Policy: rules for making authorization decisions.
+
+h3. Rules
+
+A _rule_ is a tuple specifying &quot;(permission) for: (subjects) to (action) on
+(resource), must  (obligations) given (context)&quot;.  For example,
+  * &quot;it is /denied/ for /users/s to /grant permissions/ on /User/s -- must /log/
+  * &quot;it is /allowed/ for /admin/s to /destroy/ /Posts/s -- must (/give secondary password/)
+  * (allow, GLG-20s, launch, nukes, alerting NORAD, given DEFCON 5 and launch keys turned at same time)
+
+
+The broadest approach is the Access Control Matrix: give the decision
+(permission and obligations) for every combination of subject, action, and
+resource.  This obviously won't scale.
+
+One popular approach is Role Based Access Control.  A Role maps (subjects) to
+groups of (action, resource, decision).
+
+One implmentation would be:
+* each subject can have_many UserRoles
+* each resource has_one ResourceType
+* there are a small number of enumerated actions
+* a DecisionsRoles table gives an allow/deny for each (role, action, resource_type).
+For example,
+
+  * faculty {can, (create,update,submit), grants}, {can not, touch knobs, experiments}
+  * students {can not, touch knobs, experiments}, {can not, order with dept credit card, pizza}
+  * custodians {can, open, all rooms}, ...
+  * Snape is a _faculty_, Hermione is a _student_, CarlReed is a _janitor_
+ 
+A large part of the appeal is that this is so easily implemented in a database:
+rule-matching is a simple 'for all roles granted this subject, the decision for
+this action and resource_type'.  It's easy to add logic for permission and role
+assignment: if the janitor WillHunting gets admitted as a student, we just add
+that fact to the UsersRoles table; and if they build a level-5 clean room, they
+can add a higher-priority rule revoking all access to that room, even to
+custodians.
+
+There's a few ways this can become cumbersome.  Context-based decisions don't
+fit well:
+  * mogwai {can not, eat, food, if it's after midnight}
+
+
+
+* Rule matcher: find all rules matching the request.
+  This involves some interplay with the policy, especially if 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 &quot;Best Practices for Authorization&quot;:http://www.owasp.org/index.php/Guide_to_Authorization
 
 # auth system should deny by default</diff>
      <filename>notes/Authorization.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,8 @@
 
-
 app/models
   user.rb
   user/
-    email_validation_mailer		User::EmailValidationMailer
+    email_validation_mailer     User::EmailValidationMailer
     email_validation_observer
 
 app/controllers
@@ -19,14 +18,58 @@ app/views
 
 lib/email_validation
 
+'if your email is validated, you are active&quot;
+&quot;only active users can log in&quot;
+&quot;users are not active if their email is not validated&quot;
+:access_control =&gt; [:must_validate_email_to_log_in]
+must_validate_email_to_log_in
+  hooks have_role, answers 'no' to :active
+  =&gt; get_authorization must check user &amp; active.
+
 
+  # def has_role?()   end
+  # def revoke_role!() end
+  # def grant_role!() end
+  # def set_role!()    end
+  # alias_method :has_role!, :grant_role!
+  # alias_method :has_no_role, revoke_role!
+  # alias_method :has_role,    grant_role!
+  # def accepts_no_role() end
+  # def accepts_role()    end
 
 
-'if your email is validated, you are active&quot;
+---------------------------------------------------------------------------
 
+** need to make it work invariantly with user=nil meanin :anon role
 
+  bq. access_control [:new, :create, :update, :edit] =&gt; '(admin | user |
+                      moderator)', :delete =&gt; 'admin'
+      &lt;% restrict_to &quot;(admin | moderator) &amp; !blacklist&quot; do %&gt;
+        &lt;%= link_to &quot;Admin &amp; Moderator only link&quot;, :action =&gt;'foo' %&gt;
+      &lt;% end %&gt;
 
-&quot;only active users can log in&quot;
+---------------------------------------------------------------------------
 
-&quot;users are not active if their email is not validated&quot;
+Roles:
+  &quot;grant role&quot;   	 	   25 700
+  &quot;assign role&quot;  	 	  128 000
+  &quot;assign role&quot; security 	  122 000
+  &quot;revoke role&quot; security 	    9 900
+  &quot;revoke role&quot;          	   14 600
+  &quot;remove role&quot; security 	    9 500
+  &quot;remove role&quot;          	   21 500
+  security deny permit   	  476 000
+  security deny allow    	2 210 000
 
+permissions     grant  / revoke / set (true|false)
+  
+roles  		assign / remove / set (true|false)
+policies	allow  / deny   / restrict (with=&gt;Proc)
+outcomes 	allow  / deny
+obligations
+* redirect,
+* render
+* verify (re-authenticate)
+* confirm (are you sure?)
+* log
+* escalate (secondary passwd)</diff>
      <filename>notes/ComponentLayout.txt</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ h1. Rails Authentication, Authorization and Access Control plugins
 h2. Authentication plugins
 
 * http://github.com/technoweenie/restful-authentication/tree/master -- the accepted standard for authentication
-* http://github.com/mrflip/restful-authentication/tree/master -- my fork of restful_authentication with more modularity, more specs and a few security tweaks
+* http://github.com/mrflip/restful-authentication/tree/master -- mrflip's fork of restful_authentication with more modularity, more specs and a few security tweaks
 * http://github.com/josh/open_id_authentication/tree/master -- OpenID authentication
 
 h2. Authorization plugins
@@ -12,66 +12,128 @@ From
 * http://agilewebdevelopment.com/plugins/tag/security
 * http://www.vaporbase.com/postings/Authorization_in_Rails
 
-* http://github.com/jbarket/restful-authorization/tree/master
+List:
 
-* http://agilewebdevelopment.com/plugins/rolerequirement
+* restful-authorization
+  http://github.com/jbarket/restful-authorization/tree/master
+
+* role_requirement
+  http://agilewebdevelopment.com/plugins/rolerequirement
   http://code.google.com/p/rolerequirement/
   http://rolerequirement.googlecode.com/svn/tags/role_requirement/
   9 votes
 
-* http://github.com/ezmobius/acl_system2/
+* ACL System 2
+  http://github.com/ezmobius/acl_system2/
   http://agilewebdevelopment.com/plugins/acl_system
   http://opensvn.csie.org/ezra/rails/plugins/dev/acl_system2/
   last touched 2006
   57 votes on AWD
   * also: http://agilewebdevelopment.com/plugins/acl_system2_ownership
 
-  bq. access_control [:new, :create, :update, :edit] =&gt; '(admin | user |
-                      moderator)', :delete =&gt; 'admin'
-      &lt;% restrict_to &quot;(admin | moderator) &amp; !blacklist&quot; do %&gt;
-        &lt;%= link_to &quot;Admin &amp; Moderator only link&quot;, :action =&gt;'foo' %&gt;
-      &lt;% end %&gt;
-
-* Authorization Recipe (from Rails Recipes #32)
-  http://www.vaporbase.com/postings/Authorization_in_Rails
-  http://opensvn.csie.org/mabs29/plugins/simple_access_control
-
-* Active ACL
-  http://phpgacl.sourceforge.net/demo/phpgacl/docs/manual.html
-  (Access-matrix driven)
-
-* http://github.com/aiwilliams/access_controlled_system
-
-* http://agilewebdevelopment.com/plugins/access
-
-* http://robzon.aenima.pl/2007/12/base-auth-is-out.html
-  http://agilewebdevelopment.com/plugins/base_auth
-  http://base-auth.googlecode.com/svn/trunk/
-  40 votes
-
-* http://agilewebdevelopment.com/plugins/authorization
+* Rails-Authorization (see below)
+  http://agilewebdevelopment.com/plugins/authorization
   http://www.writertopia.com/developers/authorization
   http://github.com/DocSavage/rails-authorization-plugin/tree/master
-  Opaque policy descriptions
   19 votes
 
-* http://github.com/shuber/access_control_list/
-  Not much there yet
-
-* https://opensvn.csie.org/traccgi/tobionrails
-  http://agilewebdevelopment.com/plugins/access_control
-  http://opensvn.csie.org/tobionrails/plugins/access_control
-  last touched 1 year ago
-
-* http://github.com/mdarby/restful_acl/
-  -- google code too --
-  Just does REST?  More of an app than a plugin.
-
-* http://github.com/stonean/lockdown/tree/master
-  http://lockdown.rubyforge.org
-  http://groups.google.com/group/stonean_lockdown?hl=en
-  &quot;Lockdown stores an array of access rights in the session&quot;
-
+* Others:
+** http://github.com/aiwilliams/access_controlled_system
+** http://agilewebdevelopment.com/plugins/access
+** http://robzon.aenima.pl/2007/12/base-auth-is-out.html
+   http://agilewebdevelopment.com/plugins/base_auth
+   http://base-auth.googlecode.com/svn/trunk/
+   40 votes
+** Authorization Recipe (from Rails Recipes #32)
+   http://www.vaporbase.com/postings/Authorization_in_Rails
+   http://opensvn.csie.org/mabs29/plugins/simple_access_control
+** Active ACL
+   http://phpgacl.sourceforge.net/demo/phpgacl/docs/manual.html
+   (Access-matrix driven)
+** http://github.com/shuber/access_control_list/
+** https://opensvn.csie.org/traccgi/tobionrails
+   http://agilewebdevelopment.com/plugins/access_control
+   http://opensvn.csie.org/tobionrails/plugins/access_control
+   last touched 1 year ago
+** http://github.com/mdarby/restful_acl/
+** http://github.com/stonean/lockdown/tree/master
+   http://lockdown.rubyforge.org
+   http://groups.google.com/group/stonean_lockdown?hl=en
+   &quot;Lockdown stores an array of access rights in the session&quot;
+
+---------------------------------------------------------------------------
+h3. rails-authorization
+
+  authorization
+    roles are (user, role), (user, role, rsrc_type), or (user, role, rsrc_instance)
+
+    has_role?
+    has_role, has_no_role
+    accepts_role?
+    accepts_role
+    accepts_no_role
+
+    # user.is_member? --&gt; Returns true if user has any role of &quot;member&quot;
+    # user.is_member_of? this_workshop --&gt; Returns true/false. Must have authorizable object after query.
+    # user.is_eligible_for [this_award] --&gt; Gives user the role &quot;eligible&quot; for &quot;this_award&quot;
+    # user.is_moderator --&gt; Gives user the general role &quot;moderator&quot; (not tied to any class or object)
+    # user.is_candidate_of_what --&gt; Returns array of objects for which this user is a &quot;candidate&quot; (any type)
+    # user.is_candidate_of_what(Party) --&gt; Returns array of objects for which this user is a &quot;candidate&quot; (only 'Party' type)
+    user.is_role?
+    user.is_/role_name/
+    user.is_no[t]?_role?
+    user.is_no[t]?_/role_name/
+
+    # model.has_members --&gt; Returns array of users which have role &quot;member&quot; on that model
+    # model.has_members? --&gt; Returns true/false
+    model.has_/.*/?
+    model.has_/.*/
+
+    Tables:
+      roles_users  role_id, user_id
+      roles        name, rsrc_type, rsrc_id
+
+  access control:
+    self.permit
+    permit?
+    permit
+    has_permission?
+
+---------------------------------------------------------------------------
+h3. Restful Authorization
+
+  authorization &amp; policy
+    Largely defined in access control statements.
+    Rules are deny-only with default allow
+    Users can have /roles/ and /states/, which may be denied separately.
+
+  tables:
+    roles        name
+    roles_users  join
+
+  access control:
+    authorize_role
+    authorize_state
+    authorize_/action/  =&gt; calls action_is_authorized?
+    self.require_authorization
+      =&gt; adds before_filter :check_authorization,
+         keeps its own options hash
+    takes the standard before_filter args:
+      :only, :except, :if =&gt; proc_or_string, :unless =&gt; proc_or_string
+
+    outcome:
+      default allow, rules can only deny.
+    obligations:
+      On deny:
+        :redirect_url =&gt; &quot;/session/new&quot;
+        :render_url =&gt; { :file =&gt; &quot;#{RAILS_ROOT}/public/404.html&quot; }, :status =&gt; &quot;404&quot;
+        (else falls through to access_denied)
+      On success:
+        redirect_back_or_default can be called by code
+      next_authorized_url_for?(user, {:controller=&gt;, :action=&gt;, ...params...}, binding)
+        =&gt; acts as a rule chain, giving a (deny, redirect or render) or nil for success
+
+***************************************************************************  
 h2. Trust / Validation etc. plugins
 
 </diff>
      <filename>notes/RailsPlugins.txt</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>682c8f9193d9d4f38e34cdcb0fb772c5594b052f</id>
    </parent>
  </parents>
  <author>
    <name>Philip (flip) Kromer</name>
    <email>flip@infochimps.org</email>
  </author>
  <url>http://github.com/technoweenie/restful-authentication/commit/673fcf889fe420a1dd20ec7e9306af9287286d62</url>
  <id>673fcf889fe420a1dd20ec7e9306af9287286d62</id>
  <committed-date>2008-06-01T23:11:29-07:00</committed-date>
  <authored-date>2008-06-01T23:11:29-07:00</authored-date>
  <message>Added simple roles, simple automatic role assignment hook; minor fixes:
* handle_login_error lives in sessions_controller, as it should
* get_authorization takes :context =&gt; /anything extra/ (was spelled :extra)
* security_components uses .camelize, not .classify (so that pluralization remains intact)
* some notes on existing rails plugins, and on rule resolution / policy / authz</message>
  <tree>f4c5ef381bde1ae88d84ce9928ac2d9751c926d1</tree>
  <committer>
    <name>Philip (flip) Kromer</name>
    <email>flip@infochimps.org</email>
  </committer>
</commit>
