From 28a2439e3dc6b0b417ef953115c62e319916ad08 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Fri, 18 May 2012 12:15:02 +0200 Subject: [PATCH] SONAR-3480 Editing a default filter shouldn't change its owner. --- .../main/webapp/WEB-INF/app/controllers/filters_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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<