Enable checkbox to allow admin rules for new user

al
Arkady L. Shane 1 year ago
parent c6e266c3d8
commit 57c2637497
Signed by: tigro
GPG Key ID: 9C7900103E1C4F8B

@ -0,0 +1,40 @@
From 8f9c3cb9177b9371e605719c62d24ba34944b132 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/12] 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 907818f..2bf7073 100644
--- a/pyanaconda/ui/gui/spokes/user.glade
+++ b/pyanaconda/ui/gui/spokes/user.glade
@@ -265,6 +265,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

@ -1,7 +1,7 @@
Summary: Graphical system installer
Name: anaconda
Version: 34.25.2.10
Release: 1%{?dist}.inferit.4
Release: 1%{?dist}.inferit.5
License: GPLv2+ and MIT
URL: http://fedoraproject.org/wiki/Anaconda
@ -24,6 +24,7 @@ Patch1008: 0008-Replace-Fedora-references-and-update-translations.patch
Patch1009: 0009-Set-Russian-as-default-language-for-new-regions.patch
Patch1010: 0010-Set-English-as-fallback-language-for-help.patch
Patch1011: 0011-Add-MSVSphere-identification-support.patch
Patch1012: 0012-Enable-administrator-by-default.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@ -429,6 +430,9 @@ desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{buildroot}%{_d
%{_prefix}/libexec/anaconda/dd_*
%changelog
* Wed Aug 2 2023 Arkady L. Shane <ashejn@msvsphere> - 34.25.2.10-1.inferit.5
- Enable checkbox to allow admin rules for new user
* Tue Aug 1 2023 Arkady L. Shane <ashejn@msvsphere> - 34.25.2.10-1.inferit.4
- Update condition for Live and Compose

Loading…
Cancel
Save