From 459d96508f65f4122bf97e19caea4e1f88db1557 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Sun, 9 Dec 2012 20:30:10 +0100 Subject: Hide widgets of measure filters on favourites when user is not logged in --- .../org/sonar/plugins/core/widgets/measure_filter_list.html.erb | 2 +- .../org/sonar/plugins/core/widgets/measure_filter_treemap.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/measure_filter_list.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/measure_filter_list.html.erb index cfbcab78542..910e1ad2132 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/measure_filter_list.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/measure_filter_list.html.erb @@ -2,7 +2,7 @@ filter_id = widget_properties['filter'] page_size = widget_properties['pageSize'] filter = MeasureFilter.find_by_id(filter_id.to_i) if filter_id - if filter + if filter && (!filter.require_authentication? || logged_in?) filter.load_criteria_from_data filter.set_criteria_value('display', 'list') filter.set_criteria_value('pageSize', page_size) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/measure_filter_treemap.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/measure_filter_treemap.html.erb index 26f15dac1b9..22dcc59b78f 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/measure_filter_treemap.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/measure_filter_treemap.html.erb @@ -3,7 +3,7 @@ size_metric = widget_properties['sizeMetric'] color_metric = widget_properties['colorMetric'] filter = MeasureFilter.find_by_id(filter_id.to_i) if filter_id - if filter + if filter && (!filter.require_authentication? || logged_in?) url_options = {:controller => 'measures', :action => 'filter', :id => filter.id, :display => 'treemap'} filter.load_criteria_from_data filter.set_criteria_value('display', 'treemap') -- cgit v1.2.3