diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-09 20:30:10 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-12-09 20:30:10 +0100 |
commit | 459d96508f65f4122bf97e19caea4e1f88db1557 (patch) | |
tree | f5977c6a16a07d28b809a620901498b354c8c9bb /plugins | |
parent | 3a02803979395894eaa7b23c444fd9e5d4a4632c (diff) | |
download | sonarqube-459d96508f65f4122bf97e19caea4e1f88db1557.tar.gz sonarqube-459d96508f65f4122bf97e19caea4e1f88db1557.zip |
Hide widgets of measure filters on favourites when user is not logged in
Diffstat (limited to 'plugins')
2 files changed, 2 insertions, 2 deletions
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') |