<%= render :partial => 'issue/issue', :locals => {:issue => @issue_results.first} -%>
</div>
- <% if @snapshot && @issue.line && params[:source]!='false' %>
+ <!-- SONAR-4686 Do not display source code if user has not the "Code Viewer" permission -->
+ <% if @snapshot && @issue.line && params[:source]!='false' && has_role?(:codeviewer, @snapshot.project) %>
<div class="bordered">
<%= snapshot_html_source(@snapshot, {:line_range => (@issue.line-5)..(@issue.line+5), :highlighted_lines => [@issue.line]}) -%>
</div>
<% else %>
- <!-- SONAR-4438
- If no source code, add a blank component in order for the "more action" link to be weel displayed
+ <!--
+ SONAR-4438 If no source code, add blank lines in order for the "more action" link to be well displayed
-->
<div style="height: 60px;"></div>
<% end %>