]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3483 "My Filters" shouldn't display filters which are owned by another user
authorDavid Gageot <david@gageot.net>
Fri, 18 May 2012 09:14:00 +0000 (11:14 +0200)
committerDavid Gageot <david@gageot.net>
Fri, 18 May 2012 10:27:59 +0000 (12:27 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/filters_controller.rb

index d50974761655ccbf70b1e33809d0c9ac1321e083..a60379f999821e9b05e0d9f56e8261f392e35825 100644 (file)
@@ -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