From 0b57471484b98dd37de0eb6ce95b3cda393aae7c Mon Sep 17 00:00:00 2001 From: tigro Date: Tue, 19 Dec 2023 13:53:57 +0300 Subject: [PATCH 11/14] 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.39.3