Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 74bf8d4

Browse files
Wording fixes to 'name' user admin api filter (#8163)
Some fixes to wording I noticed after merging #7377.
1 parent 79ac619 commit 74bf8d4

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

changelog.d/7377.misc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Search in columns 'name' and 'displayname' in the admin users endpoint. Contributed by Awesome Technologies Innovationslabor GmbH.
1+
Add filter `name` to the `/users` admin API, which filters by user ID or displayname. Contributed by Awesome Technologies Innovationslabor GmbH.

changelog.d/8163.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add filter `name` to the `/users` admin API, which filters by user ID or displayname. Contributed by Awesome Technologies Innovationslabor GmbH.

docs/admin_api/user_admin_api.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,11 @@ from a previous call.
119119
The parameter ``limit`` is optional but is used for pagination, denoting the
120120
maximum number of items to return in this call. Defaults to ``100``.
121121

122-
The parameter ``user_id`` is optional and can be used to filter by user id.
122+
The parameter ``user_id`` is optional and filters to only return users with user IDs
123+
that contain this value. This parameter is ignored when using the ``name`` parameter.
123124

124-
The parameter ``name`` is optional and can be used to list only users with the
125-
local part of the user ID or display name that contain this value.
125+
The parameter ``name`` is optional and filters to only return users with user ID localparts
126+
**or** displaynames that contain this value.
126127

127128
The parameter ``guests`` is optional and if ``false`` will **exclude** guest users.
128129
Defaults to ``true`` to include guest users.

synapse/storage/databases/main/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def get_users_paginate(
507507
Args:
508508
start (int): start number to begin the query from
509509
limit (int): number of rows to retrieve
510-
user_id (string): search for user_id
510+
user_id (string): search for user_id. ignored if name is not None
511511
name (string): search for local part of user_id or display name
512512
guests (bool): whether to in include guest users
513513
deactivated (bool): whether to include deactivated users

0 commit comments

Comments
 (0)