From: David Gageot Date: Fri, 18 May 2012 09:14:00 +0000 (+0200) Subject: SONAR-3483 "My Filters" shouldn't display filters which are owned by another user X-Git-Tag: 3.1~175 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8b444d0ac83127693473d466cbe9b0c289d678fb;p=sonarqube.git SONAR-3483 "My Filters" shouldn't display filters which are owned by another user --- 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 d5097476165..a60379f9998 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 @@ -29,7 +29,7 @@ class FiltersController < ApplicationController def manage if is_admin? - @filters = ::Filter.find(:all, :conditions => ['user_id=? or shared=?', current_user.id, true]) + @filters = ::Filter.find(:all, :conditions => ['user_id=? or (shared=? and user_id is null)', current_user.id, true]) else @filters = ::Filter.find(:all, :conditions => {:user_id => current_user.id}) end