diff options
author | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2013-01-11 15:22:00 +0100 |
---|---|---|
committer | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2013-01-11 15:22:32 +0100 |
commit | f75396cb1754322c72e66bc4e588b88af4d9ea71 (patch) | |
tree | 876177369c753895d12e3932dd52c54a9360a1f8 /sonar-server | |
parent | b3ac1f07b44394fe08f467ac104ea1e797d2e4f3 (diff) | |
download | sonarqube-f75396cb1754322c72e66bc4e588b88af4d9ea71.tar.gz sonarqube-f75396cb1754322c72e66bc4e588b88af4d9ea71.zip |
SONAR-3932 problems with "Raw" link in Violations drilldown
=> For user without Code Viewer role
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb index 1f889f74354..f6990640dc1 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_tabs.html.erb @@ -1,7 +1,13 @@ <% - display_title=(params[:display_title]=='true') - if display_title + if @extensions.empty? %> + <span class="note"><%= message('code_viewer.no_info_displayed_due_to_security') -%></span> +<% + else + display_title=(params[:display_title]=='true') +%> + +<% if display_title %> <div id="source_title"> <% selected_project_id = params[:project].to_i @@ -19,7 +25,7 @@ <ul class="tablinks"> <% first=true - if @snapshot.source + if @snapshot.source && has_role?(:codeviewer, @snapshot) %> <li class="<%= 'first' if first -%>"> <a href="<%= ApplicationController.root_context -%>/api/sources?resource=<%= @resource.key -%>&format=txt"><%= message('raw') -%></a> @@ -56,3 +62,5 @@ </li> </ul> </div> + +<% end %> |