[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>
Mon, 21 Jul 2025 16:21:10 +0000 (18:21 +0200)
commit6a0d406a25610923b8bcd0333df9440ef46c6d5f
tree444f05c359029aeec60a50280504cfe3bc0bf554
parentfd8ea12ef841e8847cfdf8186f3095a60d595cb4
[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