[PATCH 3/4] Password spoke is mandatory if the created user is not an admin

Martin Sivak msivak at redhat.com
Thu Feb 28 10:09:41 UTC 2013


---
 pyanaconda/ui/gui/spokes/password.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py
index 441050e..7e62ec7 100644
--- a/pyanaconda/ui/gui/spokes/password.py
+++ b/pyanaconda/ui/gui/spokes/password.py
@@ -85,7 +85,8 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke):
 
     @property
     def mandatory(self):
-        return not self.data.user.userList
+        return not any(user for user in self.data.user.userList
+                            if "wheel" in user.groups)
         
     def apply(self):
         self.data.rootpw.password = cryptPassword(self._password)
-- 
1.7.11.7



More information about the anaconda-patches mailing list