Fixed routing bug on (ex) admin controller.

This commit is contained in:
Benjamin Meichsner 2010-03-22 01:58:37 +01:00
parent 9a54d8504c
commit 571548dfbc
10 changed files with 9 additions and 15 deletions

View file

@ -1,7 +1,5 @@
class AdminController < ApplicationController
class Admin::BaseController < ApplicationController
before_filter :authenticate_admin
filter_parameter_logging :password, :password_confirmation # do not log passwort parameters
def index
@user = self.current_user

View file

@ -1,5 +1,4 @@
class Admin::OrdergroupsController < ApplicationController
before_filter :authenticate_admin
class Admin::OrdergroupsController < Admin::BaseController
def index
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100)

View file

@ -1,6 +1,4 @@
class Admin::UsersController < ApplicationController
before_filter :authenticate_admin
filter_parameter_logging :password, :password_confirmation # do not log passwort parameters
class Admin::UsersController < Admin::BaseController
def index
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100)

View file

@ -1,5 +1,4 @@
class Admin::WorkgroupsController < ApplicationController
before_filter :authenticate_admin
class Admin::WorkgroupsController < Admin::BaseController
def index
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 100)

View file

@ -1,5 +1,6 @@
class ApplicationController < ActionController::Base
filter_parameter_logging :password, :password_confirmation # do not log passwort parameters
before_filter :select_foodcoop, :authenticate, :store_controller
after_filter :remove_controller

View file

@ -1,6 +1,5 @@
class LoginController < ApplicationController
skip_before_filter :authenticate # no authentication since this is the login page
filter_parameter_logging "password" # do not log "password" parameter
before_filter :validate_token, :only => [:password, :update_password]
verify :method => :post, :only => [:login, :reset_password, :new], :redirect_to => { :action => :index }