Skip to content

Commit

Permalink
check missing encryption password
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Apr 9, 2024
1 parent 0e8818b commit 0d645aa
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/lib/y2storage/dialogs/proposal.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding: utf-8
# Copyright (c) [2016-2022] SUSE LLC
#
# All Rights Reserved.
Expand Down Expand Up @@ -126,7 +127,6 @@ def summary
# TODO: if there is a proposal, use the meaningful description with
# hyperlinks instead of just delegating the summary to libstorage
content = devicegraph ? actions_html : failure_html

RichText(Id(:summary), content)
end

Expand All @@ -139,12 +139,27 @@ def summary
def actions_html
actions_source_html +
boss_html +
encryption_error +
setup_errors_html +
# Reuse the exact string "Changes to partitioning" from the partitioner
_("<p>Changes to partitioning:</p>") +
@actions_presenter.to_html
end

def encryption_error
ret = ""
if (!@proposal.nil? &&
!@proposal.settings.nil? &&
!@proposal.settings.encryption_method.nil? &&
@proposal.settings.encryption_password.nil?)
ret = Yast::HTML.Para (_("Missing encryption password - Proposal has been done without encryption.")) +
Yast::HTML.Newline +
_("Please use \"Guided Setup\" in order to set the password or in order to disable encryption.")
ret = Yast::HTML.Colorize(ret, "red")
end
ret
end

def boss_html
return "" if boss_devices.empty?

Expand Down

0 comments on commit 0d645aa

Please sign in to comment.