Skip to content

Commit

Permalink
Merge pull request #343 from jntullo/bz_1546944
Browse files Browse the repository at this point in the history
Add svc_catalog_provision product feature to service dialog queries
  • Loading branch information
gtanzillo authored Mar 8, 2018
2 parents ef464d1 + 2033b14 commit 31b312c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
12 changes: 9 additions & 3 deletions config/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2466,10 +2466,14 @@
:collection_actions:
:get:
- :name: read
:identifier: miq_ae_customization_explorer
:identifier:
- miq_ae_customization_explorer
- svc_catalog_provision
:post:
- :name: query
:identifier: miq_ae_customization_explorer
:identifier:
- miq_ae_customization_explorer
- svc_catalog_provision
- :name: refresh_dialog_fields
:identifier: svc_catalog_provision
- :name: delete
Expand All @@ -2483,7 +2487,9 @@
:resource_actions:
:get:
- :name: read
:identifier: miq_ae_customization_explorer
:identifier:
- miq_ae_customization_explorer
- svc_catalog_provision
:post:
- :name: refresh_dialog_fields
:identifier: svc_catalog_provision
Expand Down
16 changes: 16 additions & 0 deletions spec/requests/service_dialogs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@
expect(response).to have_http_status(:ok)
end

it "allows read of service dialogs with the service catalog provision role" do
api_basic_authorize("svc_catalog_provision")

get api_service_dialogs_url

expect(response).to have_http_status(:ok)
end

it "allows read of a single service dialog with the service catalog provision role" do
api_basic_authorize("svc_catalog_provision")

get api_service_dialog_url(nil, dialog1)

expect(response).to have_http_status(:ok)
end

it "query with expanded resources to include content" do
api_basic_authorize collection_action_identifier(:service_dialogs, :read, :get)
get api_service_dialogs_url, :params => { :expand => "resources" }
Expand Down

0 comments on commit 31b312c

Please sign in to comment.