diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb index 2e0e7e8..89bdc44 100644 --- a/app/helpers/auth_helper.rb +++ b/app/helpers/auth_helper.rb @@ -11,10 +11,10 @@ module AuthHelper def require_user + return if session[:token] + if !User.current.logged? - unless session[:token] - render :file => "public/401.html.erb", :status => :unauthorized, :layout =>true - end + render :file => "public/401.html.erb", :status => :unauthorized, :layout =>true end end end