aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-08-28 14:06:37 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-08-28 14:06:44 +0200
commit8b266df87be50366ff730bd21059ea746f2d079a (patch)
tree779aae147a8add50d82e715e08db632ff2957647 /server
parente56ff9d45ca09c94978d5416fbdd63b0c2bf9332 (diff)
downloadsonarqube-8b266df87be50366ff730bd21059ea746f2d079a.tar.gz
sonarqube-8b266df87be50366ff730bd21059ea746f2d079a.zip
SONAR-5417 Remove /batch_bootstrap/properties WS as it's now no more used
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/batch_bootstrap_controller.rb38
1 files changed, 0 insertions, 38 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/batch_bootstrap_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/batch_bootstrap_controller.rb
index a12fb2fbc52..547d0bf7dcf 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/batch_bootstrap_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/batch_bootstrap_controller.rb
@@ -51,44 +51,6 @@ class BatchBootstrapController < Api::ApiController
end
end
- # GET /batch_bootstrap/properties?[project=<key or id>][&dryRun=true|false]
- def properties
- dryRun = params[:dryRun].present? && params[:dryRun] == "true"
- has_dryrun_role = has_role?('dryRunScan')
- has_scan_role = has_role?('scan')
-
- return render_unauthorized("You're not authorized to execute any SonarQube analysis. Please contact your SonarQube administrator.") if (!has_dryrun_role && !has_scan_role)
- return render_unauthorized("You're only authorized to execute a local (dry run) SonarQube analysis without pushing the results to the SonarQube server. Please contact your SonarQube administrator.") if (!dryRun && !has_scan_role)
-
- keys=Set.new
- properties=[]
-
- # project properties
- root_project = load_project()
- return render_unauthorized("You're not authorized to access to project '" + root_project.name + "', please contact your SonarQube administrator") if root_project && !has_scan_role && !has_role?(:user, root_project)
-
- if root_project
- # bottom-up projects
- projects=[root_project].concat(root_project.ancestor_projects)
- projects.each do |project|
- Property.find(:all, :conditions => ['resource_id=? and user_id is null', project.id]).each do |prop|
- properties<<prop if keys.add? prop.key
- end
- end
- end
-
- # global properties
- Property.find(:all, :conditions => 'resource_id is null and user_id is null').each do |prop|
- properties<<prop if keys.add? prop.key
- end
-
- # apply security
- properties = properties.select{|prop| allowed?(prop.key, dryRun, has_scan_role)}
-
- json_properties=properties.map { |property| to_json_property(property) }
-
- render :json => JSON(json_properties)
- end
private