Commit 125e45cd authored by Marek Lewandowski's avatar Marek Lewandowski

Force user to authenticate instead of raising error

parent 531c5b0c
......@@ -83,7 +83,7 @@ class PeopleController < ApplicationController
def show
@person = Person.find_from_guid_or_username(params)
raise(ActiveRecord::RecordNotFound) if remote_profile_with_no_user_session?
authenticate_user! if remote_profile_with_no_user_session?
return redirect_to :back, :notice => t("") if @person.closed_account?
@post_type = :all
......@@ -287,11 +287,12 @@ describe PeopleController do
it 'throws 404 if the person is remote' do
it 'forces to sign in if the person is remote' do
p = FactoryGirl.create(:person)
get :show, :id => p.to_param
response.status.should == 404
response.should be_redirect
response.should redirect_to new_user_session_path
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment