404 googlebotz left and right on public remote person pages
This commit is contained in:
parent
35bc86f6a6
commit
dc60181033
2 changed files with 13 additions and 0 deletions
|
|
@ -50,6 +50,12 @@ class PeopleController < ApplicationController
|
|||
|
||||
def show
|
||||
@person = Person.where(:id => params[:id]).first
|
||||
if @person && @person.remote? && !user_signed_in?
|
||||
render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
@post_type = :all
|
||||
@aspect = :profile
|
||||
@share_with = (params[:share_with] == 'true')
|
||||
|
|
|
|||
|
|
@ -154,6 +154,13 @@ describe PeopleController do
|
|||
|
||||
assigns[:posts].should =~ public_posts
|
||||
end
|
||||
|
||||
it 'throws 404 if the person is remote' do
|
||||
p = Factory(:person)
|
||||
|
||||
get :show, :id => p.id
|
||||
response.status.should == 404
|
||||
end
|
||||
end
|
||||
context "when the person is a contact of the current user" do
|
||||
before do
|
||||
|
|
|
|||
Loading…
Reference in a new issue