Commit 6b5e3fe9af8d47714383d69108a22c7d6d224ef8
Exists in
master
and in
29 other branches
Merge commit 'refs/merge-requests/82' of git://gitorious.org/noosfero/noosfero i…
…nto merge-requests/82
Showing
3 changed files
with
19 additions
and
10 deletions
Show diff stats
app/views/profile/_profile.rhtml
... | ... | @@ -11,19 +11,14 @@ |
11 | 11 | <% end %> |
12 | 12 | |
13 | 13 | <% if @profile.organization? %> |
14 | - <% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> | |
15 | - <% tabs << {:title => _('What\'s new'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %> | |
16 | - <% end %> | |
14 | + <% tabs << {:title => _('What\'s new'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %> | |
17 | 15 | <% tabs << {:title => _('Profile'), :id => 'organization-profile', :content => (render :partial => 'organization_profile')} %> |
18 | 16 | <% elsif @profile.person? %> |
19 | 17 | <% if logged_in? && current_person.follows?(@profile) %> |
20 | 18 | <% tabs << {:title => _('Network'), :id => 'profile-network', :content => (render :partial => 'profile_network')} %> |
21 | 19 | <% end %> |
22 | 20 | |
23 | - <% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> | |
24 | - <% tabs << {:title => _('Activity'), :id => 'profile-activity', :content => (render :partial => 'profile_activity')} %> | |
25 | - <% end %> | |
26 | - | |
21 | + <% tabs << {:title => _('Activity'), :id => 'profile-activity', :content => (render :partial => 'profile_activity')} %> | |
27 | 22 | <% tabs << {:title => _('Profile'), :id => 'person-profile', :content => (render :partial => 'person_profile')} %> |
28 | 23 | <% end %> |
29 | 24 | ... | ... |
app/views/profile/index.rhtml
... | ... | @@ -15,6 +15,8 @@ |
15 | 15 | </div> |
16 | 16 | <% end %> |
17 | 17 | |
18 | -<table class='profile'> | |
19 | - <%= render :partial => 'profile' %> | |
20 | -</table> | |
18 | +<% if @profile.public? || (logged_in? && current_person.follows?(@profile)) %> | |
19 | + <table class='profile'> | |
20 | + <%= render :partial => 'profile' %> | |
21 | + </table> | |
22 | +<% end %> | ... | ... |
features/private_profile.feature
... | ... | @@ -40,3 +40,15 @@ Feature: private profiles |
40 | 40 | When I am on Safernet's homepage |
41 | 41 | Then I should see "What's new" |
42 | 42 | |
43 | + Scenario: person private profiles should not display sensible information | |
44 | + Given I am logged in as "joao" | |
45 | + When I go to shygirl's homepage | |
46 | + Then I should not see "Basic information" | |
47 | + Then I should not see "Work" | |
48 | + Then I should not see "Enterprises" | |
49 | + Then I should not see "Network" | |
50 | + | |
51 | + Scenario: community private profiles should not display sensible information | |
52 | + Given I am logged in as "joao" | |
53 | + When I go to Safernet's homepage | |
54 | + Then I should not see "Basic information" | ... | ... |