summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorTadeusz Sośnierz <tadzik@tadzik.net>2022-10-21 14:52:44 +0200
committerGitHub <noreply@github.com>2022-10-21 13:52:44 +0100
commit1433b5d5b64c3a6624e6e4ff4fef22127c49df86 (patch)
treed8859abe2417bd7aff01abe9e18b50f736762e92 /synapse/handlers
parentFix event size checks (#13710) (diff)
downloadsynapse-1433b5d5b64c3a6624e6e4ff4fef22127c49df86.tar.xz
Show erasure status when listing users in the Admin API (#14205)
* Show erasure status when listing users in the Admin API

* Use USING when joining erased_users

* Add changelog entry

* Revert "Use USING when joining erased_users"

This reverts commit 30bd2bf106415caadcfdbdd1b234ef2b106cc394.

* Make the erased check work on postgres

* Add a testcase for showing erased user status

* Appease the style linter

* Explicitly convert `erased` to bool to make SQLite consistent with Postgres

This also adds us an easy way in to fix the other accidentally integered columns.

* Move erasure status test to UsersListTestCase

* Include user erased status when fetching user info via the admin API

* Document the erase status in user_admin_api

* Appease the linter and mypy

* Signpost comments in tests

Co-authored-by: Tadeusz Sośnierz <tadeusz@sosnierz.com>
Co-authored-by: David Robertson <david.m.robertson1@gmail.com>
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/admin.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/handlers/admin.py b/synapse/handlers/admin.py
index f2989cc4a2..5bf8e86387 100644
--- a/synapse/handlers/admin.py
+++ b/synapse/handlers/admin.py
@@ -100,6 +100,7 @@ class AdminHandler:
         user_info_dict["avatar_url"] = profile.avatar_url
         user_info_dict["threepids"] = threepids
         user_info_dict["external_ids"] = external_ids
+        user_info_dict["erased"] = await self.store.is_user_erased(user.to_string())
 
         return user_info_dict