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 the provider region to the replication subscription array data #11990

Merged

Conversation

carbonin
Copy link
Member

@carbonin carbonin commented Oct 17, 2016

Not having this data was preventing any of the central administration authentication UI feature from working.

@lgalis please review.

https://bugzilla.redhat.com/show_bug.cgi?id=1385821

remote_ws_address = region ? region.remote_ws_address : ''
h.merge!(:auth_key_configured => region && region.auth_key_configured? ? true : false, :remote_ws_address => remote_ws_address)
region = MiqRegion.find_by(:region => h[:provider_region])
if region
Copy link
Member

Choose a reason for hiding this comment

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

You could get rid of this conditional with:

h.merge!(:auth_key_configured => region.try(:auth_key_configured?), :remote_ws_address => region.try(:remote_ws_address).to_s)

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if we specifically need false if there is no auth key @lgalis ?

Copy link
Member

Choose a reason for hiding this comment

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

if we need false we can add a !!

@miq-bot
Copy link
Member

miq-bot commented Oct 17, 2016

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

Not having this data was preventing all of the central administration
authentication feature from working.
@carbonin carbonin force-pushed the fix_central_admin_authentication_ui branch from a1568e6 to ee0f8f5 Compare October 17, 2016 18:10
@miq-bot
Copy link
Member

miq-bot commented Oct 17, 2016

Checked commit carbonin@ee0f8f5 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
1 file checked, 1 offense detected

app/controllers/ops_controller/settings/common.rb

@chessbyte chessbyte assigned chessbyte and unassigned lgalis Oct 18, 2016
@chessbyte chessbyte merged commit 3e90d92 into ManageIQ:master Oct 18, 2016
@chessbyte chessbyte added this to the Sprint 48 Ending Oct 24, 2016 milestone Oct 18, 2016
chessbyte added a commit that referenced this pull request Oct 19, 2016
…ion_ui

Add the provider region to the replication subscription array data
(cherry picked from commit 3e90d92)

https://bugzilla.redhat.com/show_bug.cgi?id=1386344
@chessbyte
Copy link
Member

Euwe Backport details:

$ git log -1
commit d86726d940ed721ff8dfef0be2694027e73e359d
Author: Oleg Barenboim <chessbyte@gmail.com>
Date:   Tue Oct 18 05:50:00 2016 -0500

    Merge pull request #11990 from carbonin/fix_central_admin_authentication_ui

    Add the provider region to the replication subscription array data
    (cherry picked from commit 3e90d92fa6e03edc5803a02fcd8ce33633f4b59f)

    https://bugzilla.redhat.com/show_bug.cgi?id=1386344

@carbonin carbonin deleted the fix_central_admin_authentication_ui branch November 2, 2016 13:57
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.

None yet

5 participants