From 0348531e037593a59314a624cc57b9965814ae3d Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Fri, 1 Aug 2014 09:44:49 +0200 Subject: [PATCH] SONAR-5229 "Shared with all users" is not taken into account when copying a measure filter --- .../main/webapp/WEB-INF/app/controllers/measures_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb index 7c955be664b..b7c210d08d1 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb @@ -181,8 +181,7 @@ class MeasuresController < ApplicationController target.name=params[:name] target.description=params[:description] target.user_id=current_user.id - # Copy of filter should never be shared - target.shared=false + target.shared=(params[:shared]=='true') && has_role?(:shareDashboard) target.data=source.data if target.save current_user.favourited_measure_filters << target -- 2.39.5