-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
0014-Make-sure-that-a-user-is-created-at-installation-tim.patch
85 lines (73 loc) · 3.32 KB
/
0014-Make-sure-that-a-user-is-created-at-installation-tim.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From 3b28b0f466abec681947557143e916c3c760191a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
<frederic.pierret@qubes-os.org>
Date: Sun, 15 Dec 2019 17:30:10 +0100
Subject: [PATCH] Make sure that a user is created at installation time
But allow to defer it when kickstart is used.
---
pyanaconda/ui/gui/spokes/user.py | 5 ++---
pyanaconda/ui/tui/spokes/user.py | 15 +++------------
2 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py
index 84efd9b5dd..9752a4ed5f 100644
--- a/pyanaconda/ui/gui/spokes/user.py
+++ b/pyanaconda/ui/gui/spokes/user.py
@@ -30,7 +30,6 @@ from pyanaconda.modules.common.util import is_module_available
from pyanaconda.ui.gui.spokes import NormalSpoke
from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.categories.user_settings import UserSettingsCategory
-from pyanaconda.ui.common import FirstbootSpokeMixIn
from pyanaconda.ui.helpers import InputCheck
from pyanaconda.ui.gui.helpers import GUISpokeInputCheckHandler, GUIDialogInputCheckHandler
from pyanaconda.ui.gui.utils import blockedHandler, set_password_visibility
@@ -217,7 +216,7 @@ class AdvancedUserDialog(GUIObject, GUIDialogInputCheckHandler):
return False
-class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
+class UserSpoke(NormalSpoke, GUISpokeInputCheckHandler):
"""
.. inheritance-diagram:: UserSpoke
:parts: 3
@@ -459,7 +458,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke, GUISpokeInputCheckHandler):
@property
def mandatory(self):
"""Only mandatory if no admin user has been requested."""
- return not self._users_module.CheckAdminUserExists()
+ return not flags.automatedInstall
def apply(self):
# set the password only if the user enters anything to the text entry
diff --git a/pyanaconda/ui/tui/spokes/user.py b/pyanaconda/ui/tui/spokes/user.py
index e914c1cae9..6e0c124ae5 100644
--- a/pyanaconda/ui/tui/spokes/user.py
+++ b/pyanaconda/ui/tui/spokes/user.py
@@ -39,8 +39,7 @@ __all__ = ["UserSpoke"]
FULLNAME_ERROR_MSG = N_("Full name can't contain the ':' character")
-
-class UserSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
+class UserSpoke(NormalTUISpoke):
"""
.. inheritance-diagram:: UserSpoke
:parts: 3
@@ -71,7 +70,6 @@ class UserSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
return False
def __init__(self, data, storage, payload):
- FirstbootSpokeMixIn.__init__(self)
NormalTUISpoke.__init__(self, data, storage, payload)
self.initialize_start()
@@ -228,15 +226,8 @@ class UserSpoke(FirstbootSpokeMixIn, NormalTUISpoke):
@property
def mandatory(self):
- """The spoke is mandatory only if some input is missing.
-
- Possible reasons to be mandatory:
- - No admin user has been created
- - Password has been requested but not entered
- """
- return (not self._users_module.CheckAdminUserExists() or
- (self._use_password and not bool(self.user.password or
- self.user.is_crypted)))
+ """Only mandatory if no admin user has been requested."""
+ return not flags.automatedInstall
@property
def status(self):
--
2.45.2