summary refs log tree commit diff
path: root/docs/admin_api/user_admin_api.rst
diff options
context:
space:
mode:
authorBen Banfield-Zanin <benbz@matrix.org>2021-03-01 10:06:09 +0000
committerBen Banfield-Zanin <benbz@matrix.org>2021-03-01 10:06:09 +0000
commitb26bee9faf957643cd34c4146b250b0009be205d (patch)
treea7a7e29f30acb437d010bdf6116c0f2729f21a1b /docs/admin_api/user_admin_api.rst
parentMerge remote-tracking branch 'origin/release-v1.26.0' into toml/keycloak_hints (diff)
parentFixup changelog (diff)
downloadsynapse-toml/keycloak_hints.tar.xz
Merge remote-tracking branch 'origin/release-v1.28.0' into toml/keycloak_hints github/toml/keycloak_hints toml/keycloak_hints
Diffstat (limited to 'docs/admin_api/user_admin_api.rst')
-rw-r--r--docs/admin_api/user_admin_api.rst39
1 files changed, 36 insertions, 3 deletions
diff --git a/docs/admin_api/user_admin_api.rst b/docs/admin_api/user_admin_api.rst

index b3d413cf57..33dfbcfb49 100644 --- a/docs/admin_api/user_admin_api.rst +++ b/docs/admin_api/user_admin_api.rst
@@ -29,8 +29,9 @@ It returns a JSON body like the following: } ], "avatar_url": "<avatar_url>", - "admin": false, - "deactivated": false, + "admin": 0, + "deactivated": 0, + "shadow_banned": 0, "password_hash": "$2b$12$p9B4GkqYdRTPGD", "creation_ts": 1560432506, "appservice_id": null, @@ -150,6 +151,7 @@ A JSON body is returned with the following shape: "admin": 0, "user_type": null, "deactivated": 0, + "shadow_banned": 0, "displayname": "<User One>", "avatar_url": null }, { @@ -158,6 +160,7 @@ A JSON body is returned with the following shape: "admin": 1, "user_type": null, "deactivated": 0, + "shadow_banned": 0, "displayname": "<User Two>", "avatar_url": "<avatar_url>" } @@ -262,7 +265,7 @@ The following actions are performed when deactivating an user: - Reject all pending invites - Remove all account validity information related to the user -The following additional actions are performed during deactivation if``erase`` +The following additional actions are performed during deactivation if ``erase`` is set to ``true``: - Remove the user's display name @@ -760,3 +763,33 @@ The following fields are returned in the JSON response body: - ``total`` - integer - Number of pushers. See also `Client-Server API Spec <https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-pushers>`_ + +Shadow-banning users +==================== + +Shadow-banning is a useful tool for moderating malicious or egregiously abusive users. +A shadow-banned users receives successful responses to their client-server API requests, +but the events are not propagated into rooms. This can be an effective tool as it +(hopefully) takes longer for the user to realise they are being moderated before +pivoting to another account. + +Shadow-banning a user should be used as a tool of last resort and may lead to confusing +or broken behaviour for the client. A shadow-banned user will not receive any +notification and it is generally more appropriate to ban or kick abusive users. +A shadow-banned user will be unable to contact anyone on the server. + +The API is:: + + POST /_synapse/admin/v1/users/<user_id>/shadow_ban + +To use it, you will need to authenticate by providing an ``access_token`` for a +server admin: see `README.rst <README.rst>`_. + +An empty JSON dict is returned. + +**Parameters** + +The following parameters should be set in the URL: + +- ``user_id`` - The fully qualified MXID: for example, ``@user:server.com``. The user must + be local.