From: David Gageot Date: Fri, 18 May 2012 10:15:02 +0000 (+0200) Subject: SONAR-3480 Editing a default filter shouldn't change its owner. X-Git-Tag: 3.1~173 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=28a2439e3dc6b0b417ef953115c62e319916ad08;p=sonarqube.git SONAR-3480 Editing a default filter shouldn't change its owner. --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb index a60379f9998..9e7e6e2afec 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb @@ -43,6 +43,7 @@ class FiltersController < ApplicationController def create @filter=::Filter.new() + @filter.user_id=current_user.id load_filter_from_params(@filter, params) @filter.columns.build(:family => 'name', :order_index => 1, :sort_direction => 'ASC') @@ -318,7 +319,6 @@ class FiltersController < ApplicationController filter.shared=(params[:shared].present? && is_admin?) filter.favourites=params[:favourites].present? filter.resource_id=(params[:path_id].present? ? Project.by_key(params[:path_id]).id : nil) - filter.user_id=current_user.id filter.period_index=params[:period_index].to_i filter.criteria=[] filter.criteria<