diff --git a/app/views/profile/_profile.rhtml b/app/views/profile/_profile.rhtml index 388cc8d..695e4fb 100644 --- a/app/views/profile/_profile.rhtml +++ b/app/views/profile/_profile.rhtml @@ -11,19 +11,14 @@ <% end %> <% if @profile.organization? %> - <% 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 => _('What\'s new'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %> <% tabs << {:title => _('Profile'), :id => 'organization-profile', :content => (render :partial => 'organization_profile')} %> <% elsif @profile.person? %> <% if logged_in? && current_person.follows?(@profile) %> <% tabs << {:title => _('Network'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %> <% end %> - <% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> - <% tabs << {:title => _('Activity'), :id => 'profile-activity', :content => (render :partial => 'profile_activity')} %> - <% end %> - + <% tabs << {:title => _('Activity'), :id => 'profile-activity', :content => (render :partial => 'profile_activity')} %> <% tabs << {:title => _('Profile'), :id => 'person-profile', :content => (render :partial => 'person_profile')} %> <% end %> diff --git a/app/views/profile/index.rhtml b/app/views/profile/index.rhtml index be3f86d..d32f12d 100644 --- a/app/views/profile/index.rhtml +++ b/app/views/profile/index.rhtml @@ -15,6 +15,8 @@ <% end %> - - <%= render :partial => 'profile' %> -
+<% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> + + <%= render :partial => 'profile' %> +
+<% end %> diff --git a/features/private_profile.feature b/features/private_profile.feature index 4445b5c..9cd7036 100644 --- a/features/private_profile.feature +++ b/features/private_profile.feature @@ -40,3 +40,15 @@ Feature: private profiles When I am on Safernet's homepage Then I should see "What's new" + Scenario: person private profiles should not display sensible information + Given I am logged in as "joao" + When I go to shygirl's homepage + Then I should not see "Basic information" + Then I should not see "Work" + Then I should not see "Enterprises" + Then I should not see "Network" + + Scenario: community private profiles should not display sensible information + Given I am logged in as "joao" + When I go to Safernet's homepage + Then I should not see "Basic information" -- libgit2 0.21.2