From: Julien Lancelot Date: Fri, 1 Aug 2014 07:44:49 +0000 (+0200) Subject: SONAR-5229 "Shared with all users" is not taken into account when copying a measure... X-Git-Tag: 4.5-RC1~303 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0348531e037593a59314a624cc57b9965814ae3d;p=sonarqube.git SONAR-5229 "Shared with all users" is not taken into account when copying a measure filter --- 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