diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-04-22 16:40:16 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-04-22 16:40:16 +0200 |
commit | 00133f3d0675f5de520ee33eb04bcd6797d0ae61 (patch) | |
tree | bf8c3675757ed9b1f53800244fde0e3dc64f7e56 | |
parent | 8676a96880c5d94eeed3d1407166704499d22875 (diff) | |
download | sonarqube-00133f3d0675f5de520ee33eb04bcd6797d0ae61.tar.gz sonarqube-00133f3d0675f5de520ee33eb04bcd6797d0ae61.zip |
Authentication check should not be done when using Java WS on batch/index action
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/api/java_ws_controller.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/java_ws_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/java_ws_controller.rb index cb6e1c5047d..b547f08dacf 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/java_ws_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/java_ws_controller.rb @@ -21,7 +21,7 @@ # since 4.2 class Api::JavaWsController < Api::ApiController - skip_before_filter :check_authentication + skip_before_filter :check_authentication, :except => 'skip_authentication_check_for_batch_index' def index ws_request = Java::OrgSonarServerWs::ServletRequest.new(servlet_request, params.to_java) @@ -38,4 +38,11 @@ class Api::JavaWsController < Api::ApiController def redirect_to_ws_listing redirect_to :action => 'index', :wspath => 'api/webservices', :wsaction => 'list' end + + private + + def skip_authentication_check_for_batch_index + params[:wspath]=='batch' && params[:wsaction]=='index' + end + end |