aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server/src/main/webapp/WEB-INF
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-07-17 22:07:49 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-07-17 22:08:21 +0200
commitcd34d391476d4d4276289032e36934333f53a88c (patch)
tree87c161e05d4a7c62a94cc048b017b257809c77b0 /sonar-server/src/main/webapp/WEB-INF
parent3f4129f964551e8886aac88f508f434b2b152a82 (diff)
downloadsonarqube-cd34d391476d4d4276289032e36934333f53a88c.tar.gz
sonarqube-cd34d391476d4d4276289032e36934333f53a88c.zip
SONAR-3669 Filter widget crashes when end-user has not the role "user"
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/filters/_list.html.erb6
1 files changed, 4 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_list.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_list.html.erb
index f99baebe77a..cfcb9f39d98 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_list.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/filters/_list.html.erb
@@ -102,7 +102,7 @@
<%
if @filter_context.filter.display_path_data?
root_snapshot = Snapshot.find(:first, :include => 'project', :conditions => ['projects.id=? and islast=?', @filter_context.filter.resource_id, true])
- root_snapshot=nil if root_snapshot && !(has_role?(:user, root_snapshot))
+ if root_snapshot && has_role?(:user, root_snapshot)
%>
<tr class="highlight">
<td><% if logged_in? %><%= link_to_favourite(root_snapshot.project) -%><% end %></td>
@@ -127,7 +127,9 @@
</td>
<% end %>
</tr>
- <% end %>
+ <% end
+ end
+ %>
<% if @filter_context.empty? %>
<tr class="even"><td colspan="<%= 1+filter.columns.size -%>"><%= message('no_results') -%></td></tr>