aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-04-03 13:03:02 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-04-03 13:03:02 +0200
commit4100ba3ff7617ea9ab5096787d90ed13376cc5f3 (patch)
tree82323771a8de0f053fc5da23d3f452698faff765
parentceab93145b3f90c1b1ccaeb2c624e6680bca91ce (diff)
downloadsonarqube-4100ba3ff7617ea9ab5096787d90ed13376cc5f3.tar.gz
sonarqube-4100ba3ff7617ea9ab5096787d90ed13376cc5f3.zip
SONAR-3383 fix compatibility with views plugin
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb
index fdb364e30d7..c5fe2b39846 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb
@@ -30,13 +30,14 @@ class RolesController < ApplicationController
end
def projects
- @qualifiers = java_facade.getQualifiersWithProperty('hasRolePolicy')
+ # for backward-compatibility with versions of views plugin that do not depend on sonar 2.15
+ @qualifiers = (['VW', 'SVW'] + java_facade.getQualifiersWithProperty('hasRolePolicy').to_a).compact.uniq
@qualifier = params[:qualifier] || 'TRK'
# it's not possible to paginate directly in database because
# sort would be case-sensitive
- conditions_sql = 'projects.enabled=:enabled and projects.qualifier=:qualifier'
+ conditions_sql = 'projects.enabled=:enabled and projects.qualifier=:qualifier and projects.copy_resource_id is null'
conditions_values = {:enabled => true, :qualifier => @qualifier}
if params[:q].present?