diff --git a/app/views/my_projects_overviews/blocks/_members.html.erb b/app/views/my_projects_overviews/blocks/_members.html.erb index 006a472bc8..554ba7014b 100644 --- a/app/views/my_projects_overviews/blocks/_members.html.erb +++ b/app/views/my_projects_overviews/blocks/_members.html.erb @@ -28,13 +28,20 @@ See doc/COPYRIGHT.md for more details. <%=t(:label_member_plural)%> -<% if @project.members.count > 0 && users_by_role(50).any? %> -
-

- <%= render partial: "members", - locals: { users_by_role: users_by_role(50), - count_users_by_role: count_users_by_role } %> -

+ +<% if current_user.allowed_to?(:view_members, project) %> + <% if @project.members.count > 0 && users_by_role(50).any? %> +
+

+ <%= render partial: "members", + locals: { users_by_role: users_by_role(50), + count_users_by_role: count_users_by_role } %> +

+
+ <% end %> +<% else %> +
+ <%= t(:label_no_visible_members) %>
<% end %> <% if current_user.allowed_to?(:manage_members, project) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 674afe8f0f..39853bfead 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -36,6 +36,7 @@ en: label_work_package_tracking: " Work package tracking" label_members: "Members" label_member_view_all: "View all members" + label_no_visible_members: "This project has no visible members." label_subprojects: "Subprojects" project_page: