From bfd0617a0ef380e42c9a3c5a24537cb44ac10c8b Mon Sep 17 00:00:00 2001 From: "Carlos A. da Silva" Date: Fri, 9 Oct 2009 08:07:15 -0300 Subject: [PATCH] Ensure skipping authenticate! filter in passwords and confirmations controller, and adding rails_warden as dependency. --- README.rdoc | 1 + app/controllers/confirmations_controller.rb | 1 + app/controllers/passwords_controller.rb | 1 + test/rails_app/app/controllers/application_controller.rb | 2 ++ test/rails_app/app/controllers/home_controller.rb | 2 -- 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.rdoc b/README.rdoc index d2202650..d5caced1 100644 --- a/README.rdoc +++ b/README.rdoc @@ -5,6 +5,7 @@ Flexible authentication solution for Rails with Warden. == Dependencies http://github.com/hassox/warden +http://github.com/hassox/rails_warden == License diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb index 38ed82b9..efe9b1f6 100644 --- a/app/controllers/confirmations_controller.rb +++ b/app/controllers/confirmations_controller.rb @@ -1,4 +1,5 @@ class ConfirmationsController < ApplicationController + skip_before_filter :authenticate! before_filter :require_no_authentication # GET /confirmation/new diff --git a/app/controllers/passwords_controller.rb b/app/controllers/passwords_controller.rb index de1d37e2..3330a53e 100644 --- a/app/controllers/passwords_controller.rb +++ b/app/controllers/passwords_controller.rb @@ -1,4 +1,5 @@ class PasswordsController < ApplicationController + skip_before_filter :authenticate! before_filter :require_no_authentication # GET /password/new diff --git a/test/rails_app/app/controllers/application_controller.rb b/test/rails_app/app/controllers/application_controller.rb index 6635a3f4..e4604cf3 100644 --- a/test/rails_app/app/controllers/application_controller.rb +++ b/test/rails_app/app/controllers/application_controller.rb @@ -7,4 +7,6 @@ class ApplicationController < ActionController::Base # Scrub sensitive parameters from your log # filter_parameter_logging :password + + before_filter :authenticate! end diff --git a/test/rails_app/app/controllers/home_controller.rb b/test/rails_app/app/controllers/home_controller.rb index 51af26e1..95f29929 100644 --- a/test/rails_app/app/controllers/home_controller.rb +++ b/test/rails_app/app/controllers/home_controller.rb @@ -1,6 +1,4 @@ class HomeController < ApplicationController - before_filter :authenticate! - def index end end