diff --git a/app/views/profile/_profile.rhtml b/app/views/profile/_profile.rhtml index 1e33bdc..ab4dfe1 100644 --- a/app/views/profile/_profile.rhtml +++ b/app/views/profile/_profile.rhtml @@ -10,7 +10,9 @@ <% end %> <% if @profile.organization? %> - <% tabs << {:title => _('What\'s new'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %> + <% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> + <% tabs << {:title => _('What\'s new'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %> + <% end %> <% tabs << {:title => _('Profile'), :id => 'organization-profile', :content => (render :partial => 'organization_profile')} %> <% elsif @profile.person? %> <% if logged_in? && current_person.follows?(@profile) %> diff --git a/features/private_profile.feature b/features/private_profile.feature index e2fa144..4445b5c 100644 --- a/features/private_profile.feature +++ b/features/private_profile.feature @@ -29,3 +29,14 @@ Feature: private profiles And I follow "Add friend" When I go to shygirl's homepage Then I should not see "Add friend" + + Scenario: viewing a private community profile shouldn't show the news if not logged or not a member + Given I am on Safernet's homepage + Then I should not see "What's new" + And I am logged in as "joao" + When I am on Safernet's homepage + Then I should not see "What's new" + And "joao" is a member of "Safernet" + When I am on Safernet's homepage + Then I should see "What's new" + -- libgit2 0.21.2