Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
9f9082fbbd
3 changed files with 15 additions and 3 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')
|
||||
|
|
|
|||
|
|
@ -11,9 +11,8 @@ var Stream = {
|
|||
Diaspora.widgets.timeago.updateTimeAgo();
|
||||
$stream.not(".show").delegate("a.show_post_comments", "click", Stream.toggleComments);
|
||||
//audio linx
|
||||
//
|
||||
Stream.setUpAudioLinks();
|
||||
Stream.setUpImageLinks();
|
||||
//Stream.setUpImageLinks();
|
||||
|
||||
// comment link form focus
|
||||
$stream.delegate(".focus_comment_textarea", "click", function(e){
|
||||
|
|
@ -86,7 +85,7 @@ var Stream = {
|
|||
//collapse publisher
|
||||
Publisher.close();
|
||||
Publisher.clear();
|
||||
Stream.setUpImageLinks();
|
||||
//Stream.setUpImageLinks();
|
||||
Stream.setUpAudioLinks();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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