This commit is contained in:
erikjohnston 2024-01-02 11:54:17 +00:00
parent 45b0fa51ca
commit 581e3ed50e
4 changed files with 22 additions and 20 deletions

View file

@ -311,11 +311,12 @@ granting them access to the Admin API, among other things.</p>
</li>
<li>
<p><code>deactivated</code> - <strong>bool</strong>, optional. If unspecified, deactivation state will be left unchanged.</p>
<p>Note: the <code>password</code> field must also be set if both of the following are true:</p>
<p>Note:</p>
<ul>
<li><code>deactivated</code> is set to <code>false</code> and the user was previously deactivated (you are reactivating this user)</li>
<li>Users are allowed to set their password on this homeserver (both <code>password_config.enabled</code> and
<code>password_config.localdb_enabled</code> config options are set to <code>true</code>).
<li>For the password field there is no strict check of the necessity for its presence.
It is possible to have active users without a password, e.g. when authenticating with OIDC is configured.
You must check yourself whether a password is required when reactivating a user or not.</li>
<li>It is not possible to set a password if the config option <code>password_config.localdb_enabled</code> is set <code>false</code>.
Users' passwords are wiped upon account deactivation, hence the need to set a new one here.</li>
</ul>
<p>Note: a user cannot be erased with this API. For more details on
@ -388,7 +389,7 @@ that contain this value. This parameter is ignored when using the <code>name</co
Defaults to <code>true</code> to include guest users. This parameter is not supported when MSC3861 is enabled. <a href="https://github.com/matrix-org/synapse/pull/15582">See #15582</a></p>
</li>
<li>
<p><code>admins</code> - Optional flag to filter admins. If <code>true</code>, only admins are queried. If <code>false</code>, admins are excluded from
<p><code>admins</code> - Optional flag to filter admins. If <code>true</code>, only admins are queried. If <code>false</code>, admins are excluded from
the query. When the flag is absent (the default), <strong>both</strong> admins and non-admins are included in the search results.</p>
</li>
<li>
@ -451,7 +452,7 @@ User objects contain the following fields:</p>
<li><code>is_guest</code> - bool - Status if that user is a guest account.</li>
<li><code>admin</code> - bool - Status if that user is a server administrator.</li>
<li><code>user_type</code> - string - Type of the user. Normal users are type <code>None</code>.
This allows user type specific behaviour. There are also types <code>support</code> and <code>bot</code>. </li>
This allows user type specific behaviour. There are also types <code>support</code> and <code>bot</code>.</li>
<li><code>deactivated</code> - bool - Status if that user has been marked as deactivated.</li>
<li><code>erased</code> - bool - Status if that user has been marked as erased.</li>
<li><code>shadow_banned</code> - bool - Status if that user has been marked as shadow banned.</li>
@ -959,7 +960,7 @@ devices was last seen. (May be a few minutes out of date, for efficiency reasons
</li>
</ul>
<h3 id="create-a-device"><a class="header" href="#create-a-device">Create a device</a></h3>
<p>Creates a new device for a specific <code>user_id</code> and <code>device_id</code>. Does nothing if the <code>device_id</code>
<p>Creates a new device for a specific <code>user_id</code> and <code>device_id</code>. Does nothing if the <code>device_id</code>
exists already.</p>
<p>The API is:</p>
<pre><code>POST /_synapse/admin/v2/users/&lt;user_id&gt;/devices
@ -1261,10 +1262,10 @@ being limited.</li>
be local.</li>
</ul>
<h2 id="check-username-availability"><a class="header" href="#check-username-availability">Check username availability</a></h2>
<p>Checks to see if a username is available, and valid, for the server. See <a href="https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available">the client-server
<p>Checks to see if a username is available, and valid, for the server. See <a href="https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available">the client-server
API</a>
for more information.</p>
<p>This endpoint will work even if registration is disabled on the server, unlike
<p>This endpoint will work even if registration is disabled on the server, unlike
<code>/_matrix/client/r0/register/available</code>.</p>
<p>The API is:</p>
<pre><code>GET /_synapse/admin/v1/username_available?username=$localpart

View file

@ -14264,11 +14264,12 @@ granting them access to the Admin API, among other things.</p>
</li>
<li>
<p><code>deactivated</code> - <strong>bool</strong>, optional. If unspecified, deactivation state will be left unchanged.</p>
<p>Note: the <code>password</code> field must also be set if both of the following are true:</p>
<p>Note:</p>
<ul>
<li><code>deactivated</code> is set to <code>false</code> and the user was previously deactivated (you are reactivating this user)</li>
<li>Users are allowed to set their password on this homeserver (both <code>password_config.enabled</code> and
<code>password_config.localdb_enabled</code> config options are set to <code>true</code>).
<li>For the password field there is no strict check of the necessity for its presence.
It is possible to have active users without a password, e.g. when authenticating with OIDC is configured.
You must check yourself whether a password is required when reactivating a user or not.</li>
<li>It is not possible to set a password if the config option <code>password_config.localdb_enabled</code> is set <code>false</code>.
Users' passwords are wiped upon account deactivation, hence the need to set a new one here.</li>
</ul>
<p>Note: a user cannot be erased with this API. For more details on
@ -14341,7 +14342,7 @@ that contain this value. This parameter is ignored when using the <code>name</co
Defaults to <code>true</code> to include guest users. This parameter is not supported when MSC3861 is enabled. <a href="https://github.com/matrix-org/synapse/pull/15582">See #15582</a></p>
</li>
<li>
<p><code>admins</code> - Optional flag to filter admins. If <code>true</code>, only admins are queried. If <code>false</code>, admins are excluded from
<p><code>admins</code> - Optional flag to filter admins. If <code>true</code>, only admins are queried. If <code>false</code>, admins are excluded from
the query. When the flag is absent (the default), <strong>both</strong> admins and non-admins are included in the search results.</p>
</li>
<li>
@ -14404,7 +14405,7 @@ User objects contain the following fields:</p>
<li><code>is_guest</code> - bool - Status if that user is a guest account.</li>
<li><code>admin</code> - bool - Status if that user is a server administrator.</li>
<li><code>user_type</code> - string - Type of the user. Normal users are type <code>None</code>.
This allows user type specific behaviour. There are also types <code>support</code> and <code>bot</code>. </li>
This allows user type specific behaviour. There are also types <code>support</code> and <code>bot</code>.</li>
<li><code>deactivated</code> - bool - Status if that user has been marked as deactivated.</li>
<li><code>erased</code> - bool - Status if that user has been marked as erased.</li>
<li><code>shadow_banned</code> - bool - Status if that user has been marked as shadow banned.</li>
@ -14912,7 +14913,7 @@ devices was last seen. (May be a few minutes out of date, for efficiency reasons
</li>
</ul>
<h3 id="create-a-device"><a class="header" href="#create-a-device">Create a device</a></h3>
<p>Creates a new device for a specific <code>user_id</code> and <code>device_id</code>. Does nothing if the <code>device_id</code>
<p>Creates a new device for a specific <code>user_id</code> and <code>device_id</code>. Does nothing if the <code>device_id</code>
exists already.</p>
<p>The API is:</p>
<pre><code>POST /_synapse/admin/v2/users/&lt;user_id&gt;/devices
@ -15214,10 +15215,10 @@ being limited.</li>
be local.</li>
</ul>
<h2 id="check-username-availability"><a class="header" href="#check-username-availability">Check username availability</a></h2>
<p>Checks to see if a username is available, and valid, for the server. See <a href="https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available">the client-server
<p>Checks to see if a username is available, and valid, for the server. See <a href="https://matrix.org/docs/spec/client_server/r0.6.0#get-matrix-client-r0-register-available">the client-server
API</a>
for more information.</p>
<p>This endpoint will work even if registration is disabled on the server, unlike
<p>This endpoint will work even if registration is disabled on the server, unlike
<code>/_matrix/client/r0/register/available</code>.</p>
<p>The API is:</p>
<pre><code>GET /_synapse/admin/v1/username_available?username=$localpart

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long