Skip to content

Commit

Permalink
[ci] Allow anonymous access for API calls to orderkiwirepos (global_c…
Browse files Browse the repository at this point in the history
…ommand_orderkiwirepos)
  • Loading branch information
bgeuken committed Oct 17, 2016
1 parent 7b1a879 commit c9c4f0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/app/controllers/source_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class IllegalRequest < APIException
validate_action update_project_meta: { request: :project, response: :status}
validate_action update_package_meta: { request: :package, response: :status}

skip_before_action :extract_user, only: [:lastevents_public]
skip_before_action :require_login, only: [:lastevents_public]
skip_before_action :extract_user, only: [:lastevents_public, :global_command_orderkiwirepos]
skip_before_action :require_login, only: [:lastevents_public, :global_command_orderkiwirepos]

before_action :require_valid_project_name, except: [ :index, :lastevents, :lastevents_public,
:global_command_orderkiwirepos, :global_command_branch,
Expand Down
3 changes: 2 additions & 1 deletion src/api/test/functional/source_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def test_post_orderkiwirepos

def test_anonymous_access_for_global_commands
post '/source?cmd=orderkiwirepos'
assert_response 401
# anonymous access allowed here, just forwarding the request to backend fails
assert_response 400

post '/source?cmd=createmaintenanceincident'
assert_response 401
Expand Down

0 comments on commit c9c4f0f

Please sign in to comment.