Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add svc_catalog_provision product feature to service dialog queries #343

Merged
merged 1 commit into from
Mar 8, 2018

Conversation

jntullo
Copy link

@jntullo jntullo commented Mar 8, 2018

If a user is attempting to order a service catalog and have permissions to do so, they may not have permissions to view the associated dialog, resulting in a failure to order. This gives the correct permissions to complete the ordering process by keeping the product features consistent across ordering and dialogs.

cc: @gtanzillo @gmcculloug
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1546944

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@miq-bot
Copy link
Member

miq-bot commented Mar 8, 2018

Checked commit jntullo@2033b14 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@abellotti
Copy link
Member

LGTM!! Thanks @jntullo for the fast turnaround on this 👍

@gtanzillo gtanzillo added this to the Sprint 81 Ending Mar 12, 2018 milestone Mar 8, 2018
@gtanzillo gtanzillo merged commit 31b312c into ManageIQ:master Mar 8, 2018
simaishi pushed a commit that referenced this pull request Mar 9, 2018
Add svc_catalog_provision product feature to service dialog queries
(cherry picked from commit 31b312c)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553809
@simaishi
Copy link
Contributor

simaishi commented Mar 9, 2018

Gaprindashvili backport details:

$ git log -1
commit a7388e37f5bf39e975c3ee50dc8a981434a8f66c
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date:   Thu Mar 8 12:33:17 2018 -0500

    Merge pull request #343 from jntullo/bz_1546944
    
    Add svc_catalog_provision product feature to service dialog queries
    (cherry picked from commit 31b312c741321ca71e98bac76abf8224ffac53e2)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1553809

@simaishi
Copy link
Contributor

simaishi commented Apr 18, 2018

Fine backport (to manageiq repo) details:

$ git log -1
commit e04653d6af148fac6371407b00b801abfe51c0f7
Author: Gregg Tanzillo <gtanzill@redhat.com>
Date:   Thu Mar 8 12:33:17 2018 -0500

    Merge pull request #343 from jntullo/bz_1546944
    
    Add svc_catalog_provision product feature to service dialog queries
    (cherry picked from commit 31b312c741321ca71e98bac76abf8224ffac53e2)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1569079

@simaishi
Copy link
Contributor

@gtanzillo There are a few Travis failures in Fine branch after backporting this PR. Can anyone look into this?

  1) API configuration (config/api.yml) collections identifiers contains only valid miq_feature identifiers
     Failure/Error: expect(dangling).to be_empty
       expected `#<Set: {["miq_ae_customization_explorer", "svc_catalog_provision"]}>.empty?` to return true, got false
     # ./spec/requests/api/config_spec.rb:39:in `block (4 levels) in <top (required)>'

=====================================================================

  1) Service Dialogs API Service Dialogs collection allows read of service dialogs with the service catalog provision role
     Failure/Error: expect(response).to have_http_status(:ok)
       expected the response to have status code :ok (200) but it was :unauthorized (401)
     # ./spec/requests/api/service_dialogs_spec.rb:42:in `block (3 levels) in <top (required)>'

  2) Service Dialogs API Service Dialogs collection allows read of a single service dialog with the service catalog provision role
     Failure/Error: get api_service_dialog_url(nil, dialog1)
     NoMethodError:
       undefined method `api_service_dialog_url' for #<RSpec::ExampleGroups::ServiceDialogsAPI::ServiceDialogsCollection:0x000000002e593ea8>
     # /home/travis/.rvm/gems/ruby-2.3.6/gems/actionpack-5.0.7/lib/action_dispatch/testing/assertions/routing.rb:175:in `method_missing'
     # /home/travis/.rvm/gems/ruby-2.3.6/gems/actionpack-5.0.7/lib/action_dispatch/testing/integration.rb:491:in `method_missing'
     # ./spec/requests/api/service_dialogs_spec.rb:48:in `block (3 levels) in <top (required)>'

https://travis-ci.org/ManageIQ/manageiq/jobs/368195848

@abellotti
Copy link
Member

@simaishi the ManageIQ/manageiq#17314 should take care of it. waiting for specs to complete before I unwip.

@simaishi
Copy link
Contributor

Thanks Alberto!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants