Project

General

Profile

Members aren't allowed to see other members

Added by Dries Maertens about 12 years ago

Hi

Our project has a project manager, developers and clients. We don't want our clients to see each other, but the other user roles should see everyone on the project.
This is the current _members_box.html.erb file. I've already made some edits to block all clients from being show. I'm just looking for a way to check the user role and only block it for clients. I've tried some things I found online, but none seemed to be working.

  <% if @users_by_role.any? %>
  <div class="members box">
    <h3><%=l(:label_member_plural)%></h3>
    <p><% @users_by_role.keys.sort.each do |role| %>
       <%=h role %>:
       <% if role.name == 'Client' %>
         <p/>
       <% else %>
         <%= @users_by_role[role].sort.collect{|u| link_to_user u}.join(", ").html_safe %><br />
       <% end %>
     <% end %></p>
  </div>
  <% end %>

I'm also assuming the clients will still be able to go to /users/7, /user/8 ... to see other clients. Any way to block this? I don't think there are any settings I can change to easily solve my problems.