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.
41 lines
1.8 KiB
41 lines
1.8 KiB
1 year ago
|
From 4c7d08a2a06f5fe4a7f6da8d26e8c642e8684578 Mon Sep 17 00:00:00 2001
|
||
|
From: tigro <arkadiy.sheyn@softline.com>
|
||
|
Date: Wed, 2 Aug 2023 20:04:35 +0200
|
||
|
Subject: [PATCH 12/13] Enable administrator by default
|
||
|
|
||
|
---
|
||
|
pyanaconda/ui/gui/spokes/user.glade | 1 +
|
||
|
pyanaconda/ui/lib/users.py | 4 +++-
|
||
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/pyanaconda/ui/gui/spokes/user.glade b/pyanaconda/ui/gui/spokes/user.glade
|
||
|
index 3d52a93..c070066 100644
|
||
|
--- a/pyanaconda/ui/gui/spokes/user.glade
|
||
|
+++ b/pyanaconda/ui/gui/spokes/user.glade
|
||
|
@@ -267,6 +267,7 @@
|
||
|
<property name="visible">True</property>
|
||
|
<property name="can-focus">True</property>
|
||
|
<property name="receives-default">False</property>
|
||
|
+ <property name="active">True</property>
|
||
|
<property name="tooltip-text" translatable="yes" context="GUI|User">Allow this user to run the 'sudo' command.</property>
|
||
|
<property name="use-underline">True</property>
|
||
|
<property name="xalign">0</property>
|
||
|
diff --git a/pyanaconda/ui/lib/users.py b/pyanaconda/ui/lib/users.py
|
||
|
index 2ea6a6f..a0cc1ec 100644
|
||
|
--- a/pyanaconda/ui/lib/users.py
|
||
|
+++ b/pyanaconda/ui/lib/users.py
|
||
|
@@ -79,7 +79,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.41.0
|
||
|
|