From 6ca2b4ca1aa775d3c4a76a538da68a5aea5c8727 Mon Sep 17 00:00:00 2001 From: tigro Date: Tue, 19 Dec 2023 13:53:57 +0300 Subject: [PATCH 11/11] Enable administrator by default --- pyanaconda/ui/gui/spokes/user.glade | 3 ++- pyanaconda/ui/lib/users.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pyanaconda/ui/gui/spokes/user.glade b/pyanaconda/ui/gui/spokes/user.glade index 69156b1..3409166 100644 --- a/pyanaconda/ui/gui/spokes/user.glade +++ b/pyanaconda/ui/gui/spokes/user.glade @@ -263,7 +263,8 @@ True True False - True + True + True 0 True diff --git a/pyanaconda/ui/lib/users.py b/pyanaconda/ui/lib/users.py index 31665f0..415a914 100644 --- a/pyanaconda/ui/lib/users.py +++ b/pyanaconda/ui/lib/users.py @@ -40,7 +40,9 @@ def get_user_list(users_module, add_default=False, add_if_not_empty=False): # we only add default user to an empty list, to add default user to # a populated list the add_if_not_empty option needs to be used if not user_data_list or add_if_not_empty: - user_data_list.insert(0, UserData()) + data = UserData() + data.set_admin_priviledges(True) + user_data_list.insert(0, data) return user_data_list -- 2.43.0