[PATCH] kcm/users: refine "deleting logged-in user" UX
authorNate Graham <nate@kde.org>
Fri, 14 Mar 2025 22:23:58 +0000 (16:23 -0600)
committerAurélien COUDERC <coucouf@debian.org>
Tue, 20 May 2025 06:31:26 +0000 (08:31 +0200)
commiteb364f9465fcfb53a59ee029784c76b7ba3f6219
treea830299cbbec066de11090528022c4718aaacf64
parent5de28b06b00af0ee546c5d9a5f6984f2c1c32ec1
[PATCH] kcm/users: refine "deleting logged-in user" UX

Right now there are two problems:
1. Deleting a logged-in user shows no warning about this.
2. Asking to delete the files of a logged-in user fails silently
   (AccountsService simply won't do it).

This commit solves both problems: now the user sees a warning dialog
when they try to delete another logged-in user, and it also prevents
them from trying to delete a logged-in user's files, instead redirecting
them to just delete the account but not the files.

To achieve this, I needed to change what the `loggedIn` property does,
because previously it was inaccurate, returning whether the queried user
is the currently logged-in user. Now it returns whether the quaried user
is logged in, and I added a new `isMe` property to hold whether the
queried user is the currently logged-in user.

BUG: 495494
FIXED-IN: 6.4.0

Gbp-Pq: Name upstream_9abfdd26_kcm-users-refine-deleting-logged-in-user-UX.patch
kcms/users/src/CMakeLists.txt
kcms/users/src/ui/UserDetailsPage.qml
kcms/users/src/ui/main.qml
kcms/users/src/user.cpp
kcms/users/src/user.h
kcms/users/src/usermodel.cpp
kcms/users/src/usermodel.h