Commit b2ff3fa1bc63bbfeac8c1df4028f41eacf33f6c0
Exists in
master
and in
29 other branches
Merge branch 'ai3134' into 'stable'
Only show public enterprises/communities to manage http://noosfero.org/Development/ActionItem3134
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -1094,12 +1094,12 @@ module ApplicationHelper |
1094 | 1094 | |
1095 | 1095 | def manage_enterprises |
1096 | 1096 | return unless user && user.environment.enabled?(:display_my_enterprises_on_user_menu) |
1097 | - manage_link(user.enterprises, :enterprises) | |
1097 | + manage_link(user.enterprises.visible, :enterprises) | |
1098 | 1098 | end |
1099 | 1099 | |
1100 | 1100 | def manage_communities |
1101 | 1101 | return unless user && user.environment.enabled?(:display_my_communities_on_user_menu) |
1102 | - administered_communities = user.communities.more_popular.select {|c| c.admins.include? user} | |
1102 | + administered_communities = user.communities.visible.more_popular.select {|c| c.admins.include? user} | |
1103 | 1103 | manage_link(administered_communities, :communities) |
1104 | 1104 | end |
1105 | 1105 | ... | ... |