From 319a66df83a3aa19eea3612901626a6223f4e1d4 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Wed, 25 Jan 2012 16:14:05 +0100 Subject: [PATCH] SONAR-1492 Don't display edit/delete links if not admin --- .../_active_rule_note.html.erb | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb index e93a22b73ab..cc1280f30c4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_active_rule_note.html.erb @@ -16,15 +16,17 @@ <%= note.user.name -%>  (<%= distance_of_time_in_words_to_now(note.updated_at) -%>)    - <%= image_tag 'sep12.png' -%> -   - <%= message('edit') %> -   - <%= link_to_remote message('delete'), - :url => {:action => 'delete_active_rule_note', :active_rule_id => active_rule.id }, - :update => "active_rule_note_#{active_rule.id}", - :confirm => message('rules_configuration.confirm_delete_note') -%> + <% if is_admin %> + <%= image_tag 'sep12.png' -%> +   + <%= message('edit') %> +   + <%= link_to_remote message('delete'), + :url => {:action => 'delete_active_rule_note', :active_rule_id => active_rule.id }, + :update => "active_rule_note_#{active_rule.id}", + :confirm => message('rules_configuration.confirm_delete_note') -%> + <% end %>

<%= note.html_text -%>

<% elsif is_admin %> -- 2.39.5