]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2457 Fix source shown on review even if user is not 'codeviewer'
authorFabrice Bellingard <bellingard@gmail.com>
Mon, 23 May 2011 08:54:04 +0000 (10:54 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Mon, 23 May 2011 08:54:04 +0000 (10:54 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/reviews/_review.html.erb

index e3364c011d0af8b804e48c197b38c02cd3a6a2bf..b5f69900cbfcb0b8aa57ff1c496cdc1c926ebf77 100644 (file)
@@ -89,7 +89,7 @@
         </tr>
   </table>
 
-  <% if review.rule_failure && review.resource_line && review.rule_failure.snapshot %>
+  <% if review.rule_failure && review.resource_line && review.rule_failure.snapshot && has_role?(:codeviewer, review.project) %>
     <div class="marginbottom10 marginleft10">
       <%= snapshot_source_to_html(review.rule_failure.snapshot, {:line_range => (review.resource_line-5)..(review.resource_line+5), :highlighted_lines => [review.resource_line]}) -%>
     </div>