Add more user filters + move search to its own module

This commit is contained in:
Maxim Filippov 2019-03-27 03:51:59 +05:00
commit 3cf7539bca
7 changed files with 256 additions and 87 deletions

View file

@ -8,10 +8,15 @@ Authentication is required and the user must be an admin.
- Method `GET`
- Query Params:
- `query`: **string** *optional* search term
- `local_only`: **bool** *optional* whether to return only local users
- `page`: **integer** *optional* page number
- `page_size`: **integer** *optional* number of users per page (default is `50`)
- *optional* `query`: **string** search term
- *optional* `filters`: **string** comma-separated string of filters:
- `local`: only local users
- `external`: only external users
- `active`: only active users
- `deactivated`: only deactivated users
- *optional* `page`: **integer** page number
- *optional* `page_size`: **integer** number of users per page (default is `50`)
- Example: `https://mypleroma.org/api/pleroma/admin/users?query=john&filters=local,active&page=1&page_size=10`
- Response:
```JSON
@ -22,7 +27,13 @@ Authentication is required and the user must be an admin.
{
"deactivated": bool,
"id": integer,
"nickname": string
"nickname": string,
"roles": {
"admin": bool,
"moderator": bool
},
"local": bool,
"tags": array
},
...
]
@ -99,7 +110,7 @@ Authentication is required and the user must be an admin.
Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesnt exist.
### Get user user permission groups membership
### Get user user permission groups membership per permission group
- Method: `GET`
- Params: none