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

RegistrationCode widget: use always the the custom_url for registering #393

Merged
merged 2 commits into from
Oct 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion package/yast2-registration.changes
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
-------------------------------------------------------------------
Fri Oct 19 10:52:05 UTC 2018 - knut.anderssen@suse.com

- RegistrationCode widget: Use always the custom url instead of the
cached one (bsc#1100199)

- 3.2.16
-------------------------------------------------------------------
Fri Aug 31 10:12:16 UTC 2018 - lslezak@suse.cz

- Better check the not installed addon products, some specific
repositories do not provide any product
- Fixes online migration on PPC (bsc#1103412)
- 3.2.16

-------------------------------------------------------------------
Thu Jul 26 09:25:16 UTC 2018 - lslezak@suse.cz
Expand Down
5 changes: 1 addition & 4 deletions src/lib/registration/widgets/registration_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,7 @@ def valid_url?
# run the system and the base product registration
# @return [Boolean] true on success
def register_system_and_base_product
url = UrlHelpers.registration_url
return false if UrlHelpers.registration_url == :cancel

registration = Registration.new(url)
registration = Registration.new(options.custom_url)
Copy link
Member

Choose a reason for hiding this comment

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

so how is now handled cancel case? Will it still work?

Copy link
Member

Choose a reason for hiding this comment

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

I just worry if we do not break working scenario like registration on running system.

Copy link
Contributor Author

@teclator teclator Aug 21, 2018

Choose a reason for hiding this comment

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

If I'm not wrong that was mainly for slp discovery but we are even not using it as we are always using the custom_url

return url if url == :cancel

return custom_url if custom_url && !custom_url.empty?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current problem is that we are using always the cached url once obtained, other solution could be resetting the cached url before fetching it:

def self.reset_registration_url

registration_ui = RegistrationUI.new(registration)

success, product_service = registration_ui.register_system_and_base_product
Expand Down