Give up on getting cute with payload data to set required or not, just always make the user visit it. Also don't default the kickstart data to locked, that can confuse the UI --- data/interactive-defaults.ks | 1 - pyanaconda/ui/gui/spokes/password.py | 12 ++++-------- 2 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/data/interactive-defaults.ks b/data/interactive-defaults.ks index 0046cc3..f692ccd 100644 --- a/data/interactive-defaults.ks +++ b/data/interactive-defaults.ks @@ -2,4 +2,3 @@ # This is not loaded if a kickstart file is provided on the command line. auth --enableshadow --passalgo=sha512 firstboot --enable -rootpw --lock diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py index 9f5d4d9..74acd4e 100644 --- a/pyanaconda/ui/gui/spokes/password.py +++ b/pyanaconda/ui/gui/spokes/password.py @@ -55,8 +55,6 @@ class PasswordSpoke(NormalSpoke):
def initialize(self): NormalSpoke.initialize(self) - # Set the rootpw to locked by default, setting a password is optional - self.data.rootpw.lock = True # place holders for the text boxes self.pw = self.builder.get_object("pw") self.confirm = self.builder.get_object("confirm") @@ -77,10 +75,12 @@ class PasswordSpoke(NormalSpoke): def status(self): if self._error: return _("Error setting root password") + if self.data.rootpw.password: + return _("Root password is set") elif self.data.rootpw.lock: return _("Root account is disabled") else: - return _("Root password is set") + return _("Root password is not set")
def apply(self): if self._password: @@ -95,11 +95,7 @@ class PasswordSpoke(NormalSpoke):
@property def completed(self): - # FUTURE -- update completed to false if package payload doesn't - # include firstboot and some environment to run it in - # We are by default complete, but locked. If a user attempts to set - # a password but fails, then we are no longer complete. - return not self._error + return bool(self.data.rootpw.password or self.data.rootpw.lock)
def _validatePassword(self): # Do various steps to validate the password
On Fri, 2012-10-05 at 20:05 -0700, Jesse Keating wrote:
Give up on getting cute with payload data to set required or not, just always make the user visit it. Also don't default the kickstart data to locked, that can confuse the UI.
How does it confuse the UI? Spoke marked as completed even if it wasn't visited? And does this patch leave user any intuitive way to lock the root account?
On 10/08/2012 04:32 AM, Vratislav Podzimek wrote:
How does it confuse the UI? Spoke marked as completed even if it wasn't visited?
Or the status could show that the password is locked, but also that the spoke isn't finished and needs to be visited. This can be programmed around, but that's just adding more complexity.
And does this patch leave user any intuitive way to lock the root account?
The onscreen instructions when you enter the spoke should still say to leave it blank to lock the account.
On Mon, 2012-10-08 at 14:34 -0700, Jesse Keating wrote:
On 10/08/2012 04:32 AM, Vratislav Podzimek wrote:
How does it confuse the UI? Spoke marked as completed even if it wasn't visited?
Or the status could show that the password is locked, but also that the spoke isn't finished and needs to be visited. This can be programmed around, but that's just adding more complexity.
And does this patch leave user any intuitive way to lock the root account?
The onscreen instructions when you enter the spoke should still say to leave it blank to lock the account.
Okay, in that case, if we still don't want to support empty root password, ACK.
anaconda-patches@lists.fedorahosted.org