diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index b0160353d..34428cd4e 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -4,12 +4,8 @@ class HomeController < ApplicationController def show - if current_user - if current_user.admin? - redirect_to person_path(current_user.person) - else - redirect_to stream_path - end + if user_signed_in? + redirect_to stream_path elsif is_mobile_device? unless(File.exist?(Rails.root.join('app', 'views', 'home', '_show.mobile.erb'))) redirect_to user_session_path diff --git a/spec/controllers/home_controller_spec.rb b/spec/controllers/home_controller_spec.rb index f994e2101..d120c65bb 100644 --- a/spec/controllers/home_controller_spec.rb +++ b/spec/controllers/home_controller_spec.rb @@ -21,13 +21,6 @@ describe HomeController do get :show, :home => true response.should redirect_to(stream_path) end - - it "points to a user's profile page if a user is an admin without contacts" do - alice.contacts.destroy_all - Role.add_admin(alice.person) - get :show, :home => true - response.should redirect_to(person_path(alice.person)) - end end end