Lauri Ojansivu
15adf1bb2d
Fix #1289 : deleting a user no longer leaves ghost users behind.
...
Every deletion path (admin removeUser method, self-service account
delete, DELETE /api/users/:userId) removed only the users document,
leaving dangling references everywhere: empty-avatar board members that
could not be removed, stale card members/assignees/watchers, orphaned
avatar files - reproducible for 8 years and reopened in 2025. A
server-only Users.after.remove collection hook now prunes
boards.members/watchers (object-shaped, $pull by userId),
cards.members/assignees/watchers and lists.watchers (string arrays), and
the user's Avatars files, on EVERY path that removes a user; a cleanup
failure can never break the deletion itself. Activities and comments are
deliberately preserved for history - their rendering is already
null-guarded (270eacb20 , Playwright-verified).
Tests: tests/userDeletionCleanup.test.cjs (6, positive and negative,
end-to-end against a fake database).
Thanks to chotaire and xet7.
2026-07-17 03:53:09 +03:00
..
2026-06-18 04:14:59 +03:00
2026-07-16 20:01:10 +03:00
2026-06-23 16:50:24 +03:00
2026-07-17 03:27:33 +03:00
2026-05-27 20:51:44 +03:00
2026-07-17 03:34:23 +03:00
2026-07-17 03:21:02 +03:00
2026-07-17 03:34:23 +03:00
2026-07-16 17:40:24 +03:00
2026-07-17 03:07:59 +03:00
2026-07-17 01:43:53 +03:00
2026-07-05 23:22:16 +03:00
2026-07-13 09:16:33 +03:00
2026-07-11 01:53:07 +03:00
2026-07-11 00:14:49 +03:00
2026-07-11 00:14:49 +03:00
2026-07-17 03:41:20 +03:00
2026-07-09 09:45:53 +03:00
2026-07-09 09:45:53 +03:00
2026-07-17 03:07:59 +03:00
2026-07-17 03:34:23 +03:00
2026-07-08 23:57:39 +03:00
2026-07-17 03:07:59 +03:00
2026-07-09 02:14:07 +03:00
2026-06-23 08:50:29 +03:00
2026-07-16 17:40:24 +03:00
2026-07-17 03:34:23 +03:00
2026-07-05 23:12:16 +03:00
2026-06-13 17:19:51 +03:00
2026-07-06 11:19:15 +03:00
2026-07-11 00:14:49 +03:00
2026-07-05 22:23:36 +03:00
2026-07-06 13:49:44 +03:00
2026-07-17 03:07:59 +03:00
2026-07-09 09:45:53 +03:00
2026-07-17 03:21:02 +03:00
2026-07-16 17:40:24 +03:00
2026-07-09 02:14:07 +03:00
2026-07-16 17:40:24 +03:00
2026-07-16 18:54:28 +03:00
2026-07-17 03:21:02 +03:00
2026-07-17 03:34:52 +03:00
2026-06-23 16:47:00 +03:00
2026-07-05 22:54:13 +03:00
2026-07-09 02:14:07 +03:00
2026-07-06 18:27:38 +03:00
2026-07-09 09:45:53 +03:00
2026-07-09 02:14:07 +03:00
2026-07-16 19:12:59 +03:00
2026-07-16 17:40:24 +03:00
2026-06-22 15:46:43 +03:00
2026-07-16 17:40:24 +03:00
2026-07-13 09:16:33 +03:00
2026-07-17 03:34:23 +03:00
2026-07-13 09:16:33 +03:00
2026-07-17 03:30:07 +03:00
2026-07-17 03:07:59 +03:00
2026-07-06 16:02:56 +03:00
2026-07-17 03:36:07 +03:00
2026-07-09 09:45:53 +03:00
2026-07-09 02:14:07 +03:00
2026-07-17 03:34:23 +03:00
2026-07-17 03:07:59 +03:00
2026-07-16 10:17:13 +02:00
2026-07-17 03:07:59 +03:00
2026-07-13 09:16:33 +03:00
2026-07-17 03:07:59 +03:00
2026-07-09 09:45:53 +03:00
2026-06-23 16:48:59 +03:00
2026-07-06 15:22:22 +03:00
2026-07-06 11:35:56 +03:00
2026-07-06 01:25:39 +03:00
2026-07-09 09:45:53 +03:00
2026-07-09 02:14:07 +03:00
2026-07-17 03:07:59 +03:00
2026-05-27 20:51:44 +03:00
2026-07-17 03:15:52 +03:00
2026-07-17 03:07:59 +03:00
2026-07-09 10:09:32 +03:00
2026-06-23 16:36:14 +03:00
2026-07-11 00:14:49 +03:00
2026-07-06 10:55:29 +03:00
2026-07-17 03:07:59 +03:00
2026-07-17 03:07:59 +03:00
2026-07-17 03:07:59 +03:00
2026-07-09 02:14:07 +03:00
2026-07-06 15:12:21 +03:00
2026-07-17 03:34:23 +03:00
2026-07-06 10:33:15 +03:00
2026-07-09 02:14:07 +03:00
2026-06-23 08:50:29 +03:00
2026-07-09 02:14:07 +03:00
2026-07-13 09:16:33 +03:00
2026-07-09 09:45:53 +03:00
2026-07-09 02:14:07 +03:00
2026-07-16 17:40:24 +03:00
2026-07-17 03:36:50 +03:00
2026-07-06 10:43:26 +03:00
2026-07-17 03:36:50 +03:00
2026-07-17 03:36:50 +03:00
2026-07-17 03:07:59 +03:00
2026-07-09 09:45:53 +03:00
2026-07-16 17:40:24 +03:00
2026-07-09 02:14:07 +03:00
2026-07-06 01:26:05 +03:00
2026-07-13 09:16:33 +03:00
2026-07-13 09:16:33 +03:00
2026-07-17 03:21:02 +03:00
2026-07-17 03:21:28 +03:00
2026-07-09 09:45:53 +03:00
2026-07-16 18:46:09 +03:00
2026-07-17 03:34:23 +03:00
2026-07-17 03:44:38 +03:00
2026-07-08 23:43:26 +03:00
2026-07-09 09:45:53 +03:00
2026-07-17 03:12:43 +03:00
2026-06-13 17:19:51 +03:00
2026-06-13 20:15:04 +03:00
2026-06-13 17:19:51 +03:00
2026-07-16 20:01:10 +03:00
2026-07-17 03:53:09 +03:00
2026-07-06 11:50:28 +03:00
2026-07-09 09:45:53 +03:00
2025-12-22 23:18:01 +02:00
2026-06-12 20:15:56 +03:00