You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.8 KiB
43 lines
1.8 KiB
From 0b57471484b98dd37de0eb6ce95b3cda393aae7c Mon Sep 17 00:00:00 2001
|
|
From: tigro <tigro@msvsphere-os.ru>
|
|
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 @@
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">True</property>
|
|
<property name="receives_default">False</property>
|
|
- <property name="use_underline">True</property>
|
|
+ <property name="use_underline">True</property>
|
|
+ <property name="active">True</property>
|
|
<property name="xalign">0</property>
|
|
<property name="draw_indicator">True</property>
|
|
<signal name="toggled" handler="on_admin_toggled" swapped="no"/>
|
|
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
|
|
|