[PATCH 1/2] Prevent user from hitting save without entering a passphrase. (#869391)

David Lehman dlehman at redhat.com
Mon Nov 5 21:54:12 UTC 2012


We didn't apply the checks/controls of the dialog until some text was
entered, which allowed users to click through without entering anything.
---
 pyanaconda/ui/gui/spokes/lib/passphrase.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/lib/passphrase.py b/pyanaconda/ui/gui/spokes/lib/passphrase.py
index c629cd7..7bfa52c 100644
--- a/pyanaconda/ui/gui/spokes/lib/passphrase.py
+++ b/pyanaconda/ui/gui/spokes/lib/passphrase.py
@@ -85,6 +85,10 @@ class PassphraseDialog(GUIObject):
         # initialize with the previously set passphrase
         self.passphrase = self.data.autopart.passphrase
 
+        if not self.passphrase:
+            self._save_button.set_sensitive(False)
+            self._confirm_entry.set_sensitive(False)
+
         self._passphrase_entry.set_text(self.passphrase)
         self._confirm_entry.set_text(self.passphrase)
 
-- 
1.7.7.6



More information about the anaconda-patches mailing list