Skip to content

Commit

Permalink
Replace problem users column with a access summary in the tool access…
Browse files Browse the repository at this point in the history
… reports aces#1461
  • Loading branch information
MontrealSergiy committed Jan 23, 2025
1 parent 42c38fc commit 40ccf0a
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions BrainPortal/app/views/tool_configs/_by_resource.erb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<th><%= for_tool ? "Execution Servers" : "Tools" %> </th>
<th>Versions Configured</th>
<th>Projects In Effect</th>
<th class="left_align">Users with access problem(s) out of <%= users.count %></th>
<th class="left_align">Users Access Summary </th>
</tr>
<% end %>

Expand Down Expand Up @@ -149,27 +149,31 @@
users_with_access_pb = users.select do |user|
!user_can_access_resource[user] || !user_can_access_versus[user] || !tc.can_be_accessed_by?(user)
end



users_with_access = users - users_with_access_pb
%>

<% tool_pb, exec_pb = user_can_access_versus, user_can_access_resource %>
<% exec_pb, tool_pb = tool_pb, exec_pb if for_tool %>
<!-- Add information on the tooltip -->
<%= html_tool_tip(users_with_access_pb.count.to_s + " users") do %>
<% tool_pb, exec_pb = user_can_access_versus, user_can_access_resource %>
<% exec_pb, tool_pb = tool_pb, exec_pb if for_tool %>


<span style="color:green">
<%= html_tool_tip((users_with_access).count, options={:style => {:color => :green}}) do %>
<% admins = users_with_access.select {|u| u.has_role? :admin_user } %>
<%= "of which #{admins.count} are admins".html_safe %>
<% end %>
</span>
user(s) have access,
<span class="warning">
<%= html_tool_tip(users_with_access_pb.count ) do %>
<%= "#{exec_pb.values.count false} - due Execution Server's project<br/>".html_safe unless exec_pb.values.all? %>
<%= "#{tool_pb.values.count false} - due Tool's project<br/>".html_safe unless tool_pb.values.all? %>
<% end %>
</span>
users have no access
</td>
</tr>
<% end %>
<% end %>

</table>


</fieldset>

0 comments on commit 40ccf0a

Please sign in to comment.