diff options
author | Jean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com> | 2013-07-22 15:47:34 +0200 |
---|---|---|
committer | Jean-Baptiste Vilain <jean-baptiste.vilain@sonarsource.com> | 2013-07-22 15:47:34 +0200 |
commit | 3b9845b59f219ee650890577bf64b6c65f14acc0 (patch) | |
tree | f5ea3221121be800848d390dcf4ba4d8f7fe32b1 | |
parent | 27df0f32a23df9c6b3fd40855ab07a42b5a43605 (diff) | |
download | sonarqube-3b9845b59f219ee650890577bf64b6c65f14acc0.tar.gz sonarqube-3b9845b59f219ee650890577bf64b6c65f14acc0.zip |
SONAR-3392 Fixed case-sensitive sorting when listing permission templates
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/permission_templates_controller.rb | 4 | ||||
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/roles_controller.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/permission_templates_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/permission_templates_controller.rb index 1457c3c0fe3..5b4b517a7a4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/permission_templates_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/permission_templates_controller.rb @@ -184,7 +184,7 @@ class PermissionTemplatesController < ApplicationController def default_templates_form all_templates = Internal.permission_templates.selectAllPermissionTemplates - @permission_templates_options = all_templates.sort_by {|t| t.name}.collect {|t| [t.name, t.key]} + @permission_templates_options = all_templates.sort_by {|t| t.name.downcase}.collect {|t| [t.name, t.key]} @root_qualifiers = get_root_qualifiers @default_templates = get_default_templates_per_qualifier(@root_qualifiers) @@ -228,7 +228,7 @@ class PermissionTemplatesController < ApplicationController templates_names.each do |template_name| permission_templates << Internal.permission_templates.selectPermissionTemplate(template_name) end - permission_templates.sort_by {|t| t.name} + permission_templates.sort_by {|t| t.name.downcase} end end 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 126d77112ae..c9db2eba7bb 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 @@ -77,7 +77,7 @@ class RolesController < ApplicationController # GET /roles/apply_template_form?projects=<projects>&qualifier=<qualifier> def apply_template_form - @permission_templates = Internal.permission_templates.selectAllPermissionTemplates().sort_by {|t| t.name}.collect {|pt| [pt.name, pt.key]} + @permission_templates = Internal.permission_templates.selectAllPermissionTemplates().sort_by {|t| t.name.downcase}.collect {|pt| [pt.name, pt.key]} render :partial => 'apply_template_form', :locals => {:components => params[:projects], :project_name => params[:project_name], :qualifier => params[:qualifier] || 'TRK'} end |