Bug 414860

Summary: User Manager can not create a user account unless "Enable administrator privileges for this user" is checked
Product: [Unmaintained] user-manager Reporter: Patrick Silva <bugseforuns>
Component: kcontrol moduleAssignee: Jonathan Riddell <jr>
Status: RESOLVED FIXED    
Severity: grave CC: meven29, nate, nicolas.fella
Priority: VHI Keywords: regression
Version: unspecified   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 5.18
Sentry Crash Report:

Description Patrick Silva 2019-12-05 12:51:21 UTC
STEPS TO REPRODUCE
1. open system settings > account details > user manager
2. click on "+" button
3. type your username, Real Name, set your password
4. click on "Apply" button: no user account was added to the users list in the left side
5. check "Enable administrator privileges for this user", click on "Apply" button, enter your password and press enter/return: now the user account was successfuly created.


EXPECTED RESULT
a user account can be created even if "Enable administrator privileges for this user" is unchecked

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.17.80
KDE Frameworks Version: 5.65.0
Qt Version: 5.13.2
Comment 1 Nate Graham 2019-12-06 04:20:16 UTC
Oh yikes, can confirm. This is a really bad regression.
Comment 2 Méven Car 2019-12-14 08:00:50 UTC
Patch proposed at https://phabricator.kde.org/D25976
Comment 3 Méven Car 2019-12-16 21:00:38 UTC
Git commit 2471fa7d252de904b305dac77171fa300d66c05d by Méven Car.
Committed on 16/12/2019 at 21:00.
Pushed by meven into branch 'master'.

Use a default non-administrator user Type for new users in model

Summary:
If the administrator role was not set for the index assume the default normal user type.

Regression was introduced in D25398.
FIXED-IN: 5.18

Test Plan: Created a user as described in https://bugs.kde.org/show_bug.cgi?id=414860

Reviewers: ngraham, #plasma, apol

Reviewed By: ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25976

M  +6    -3    src/lib/accountmodel.cpp

https://commits.kde.org/user-manager/2471fa7d252de904b305dac77171fa300d66c05d