Browse files

Add spree_current_user back to Spree::BaseController to make tests happy

  • Loading branch information...
1 parent b61fc62 commit 28e9ffec894c47684a21b76e017ff861909b4569 @radar radar committed Jun 1, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 core/app/controllers/spree/base_controller.rb
5 core/app/controllers/spree/base_controller.rb
@@ -18,6 +18,11 @@ class Spree::BaseController < ApplicationController
return unauthorized
+ # To be overriden by authentication providers
+ def spree_current_user
+ nil
+ end
def access_forbidden
render :text => 'Access Forbidden', :layout => true, :status => 401

2 comments on commit 28e9ffe


Made tests happy, made access to /admin area break...resulting in redirect loop again.

It seems this is not being overridden as hoped by the spree/auth_helper.

Spree Commerce member

Providing a proxy method called current_user which will now be used within spree to reference the current user. This will reference spree_current_user if it exists, or nil if it doesn't.

Please sign in to comment.