| Summary: | It's possible to delete a logged-in user with no warnings | ||
|---|---|---|---|
| Product: | [Applications] systemsettings | Reporter: | Nate Graham <nate> |
| Component: | kcm_users | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | kde, uhhadd |
| Priority: | NOR | Keywords: | usability |
| Version First Reported In: | master | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/-/commit/9abfdd2640bc83608e347e2180cd30198001cb64 | Version Fixed/Implemented In: | 6.4.0 |
| Sentry Crash Report: | |||
|
Description
Nate Graham
2024-10-28 17:12:11 UTC
I don't see a thing in AccountsService's DBus interface for this, but maybe we could use get enough data about users on the system from the LoginHistory method. It would probably be easier to parse the output of `users` though. A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5320 Git commit 9abfdd2640bc83608e347e2180cd30198001cb64 by Nate Graham. Committed on 22/04/2025 at 20:48. Pushed by ngraham into branch 'master'. 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. FIXED-IN: 6.4.0 M +1 -0 kcms/users/src/CMakeLists.txt M +40 -6 kcms/users/src/ui/UserDetailsPage.qml M +1 -1 kcms/users/src/ui/main.qml M +22 -4 kcms/users/src/user.cpp M +6 -1 kcms/users/src/user.h M +7 -4 kcms/users/src/usermodel.cpp M +2 -1 kcms/users/src/usermodel.h https://invent.kde.org/plasma/plasma-workspace/-/commit/9abfdd2640bc83608e347e2180cd30198001cb64 |