Patrick Cloke
6d47b7e325
Add a type hint for `get_device_handler()` and fix incorrect types. ( #14055 )
...
This was the last untyped handler from the HomeServer object. Since
it was being treated as Any (and thus unchecked) it was being used
incorrectly in a few places.
2022-11-22 14:08:04 -05:00
Ashish Kumar
a3623af74e
Add an Admin API endpoint for looking up users based on 3PID ( #14405 )
2022-11-11 15:38:17 +00:00
Tadeusz Sośnierz
1433b5d5b6
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 30bd2bf106
.
* 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>
2022-10-21 13:52:44 +01:00
Brendan Abolivier
be76cd8200
Allow admins to require a manual approval process before new accounts can be used (using MSC3866) ( #13556 )
2022-09-29 15:23:24 +02:00
Brendan Abolivier
8ae42ab8fa
Support enabling/disabling pushers (from MSC3881) ( #13799 )
...
Partial implementation of MSC3881
2022-09-21 14:39:01 +00:00
Quentin Gliech
74f60cec92
Add an admin API endpoint to find a user based on its external ID in an auth provider. ( #13810 )
2022-09-16 12:29:03 +00:00
Dirk Klimpel
f799eac7ea
Add timestamp to user's consent ( #13741 )
...
Co-authored-by: reivilibre <olivier@librepush.net>
2022-09-08 15:41:48 +00:00
Connor Davis
bb5b47b62a
Add Admin API to Fetch Messages Within a Particular Window ( #13672 )
...
This adds two new admin APIs that allow us to fetch messages from a room within a particular time.
2022-09-07 10:54:44 +01:00
David Robertson
a160406d24
Fix admin List Room API return type on sqlite ( #13509 )
2022-08-31 10:38:16 +00:00
Dirk Klimpel
37f329c9ad
Fix that sending server notices fail if avatar is `None` ( #13566 )
...
Indroduced in #11846 .
2022-08-23 09:48:35 +01:00
Andrew Morgan
f9f03426de
Implement MSC3852: Expose `last_seen_user_agent` to users for their own devices; also expose to Admin API ( #13549 )
2022-08-19 16:17:10 +00:00
reivilibre
8bdf2bd31e
Fix a bug in the `/event_reports` Admin API which meant that the total count could be larger than the number of results you can actually query for. ( #13525 )
...
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-08-17 18:08:23 +00:00
Dirk Klimpel
d75512d19e
Add forgotten status to Room Details API ( #13503 )
2022-08-17 09:42:01 +00:00
Dirk Klimpel
2281427175
Use literals in place of `HTTPStatus` constants in tests ( #13488 )
...
* Use literals in place of `HTTPStatus` constants in tests
* newsfile
* code style
* code style
2022-08-10 11:01:12 -07:00
Dirk Klimpel
1595052b26
Use literals in place of `HTTPStatus` constants in tests ( #13479 )
...
Replace
- `HTTPStatus.NOT_FOUND`
- `HTTPStatus.FORBIDDEN`
- `HTTPStatus.UNAUTHORIZED`
- `HTTPStatus.CONFLICT`
- `HTTPStatus.CREATED`
Signed-off-by: Dirk Klimpel <dirk@klimpel.org>
2022-08-09 14:56:43 +01:00
Dirk Klimpel
c97042f7ee
Use literals in place of `HTTPStatus` constants in tests ( #13469 )
2022-08-08 13:21:27 -07:00
andrew do
78a3111c41
Return 404 or member list when getting joined_members after leaving ( #13374 )
...
Signed-off-by: Andrew Doh <andrewddo@gmail.com>
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Co-authored-by: Andrew Morgan <andrewm@element.io>
Co-authored-by: Brendan Abolivier <babolivier@matrix.org>
2022-08-03 14:26:31 +02:00
reivilibre
39be5bc550
Make minor clarifications to the error messages given when we fail to join a room via any server. ( #13160 )
2022-07-27 10:37:50 +00:00
Dirk Klimpel
96cf81e312
Use HTTPStatus constants in place of literals in tests. ( #13297 )
2022-07-15 19:31:27 +00:00
Thomas Weston
0312ff44c6
Fix "add user" admin api error when request contains a "msisdn" threepid ( #13263 )
...
Co-authored-by: Thomas Weston <thomas.weston@clearspancloud.com>
Co-authored-by: David Robertson <david.m.robertson1@gmail.com>
2022-07-13 11:33:21 +01:00
andrew do
2d82cdafd2
expose whether a room is a space in the Admin API ( #13208 )
2022-07-12 15:30:53 +01:00
David Robertson
d102ad67fd
annotate tests.server.FakeChannel ( #13136 )
2022-07-04 18:08:56 +01:00
Patrick Cloke
f7baffd8ec
Remove remaining pieces of groups code. ( #12966 )
...
* Remove an unused stream ID generator.
* Remove the now unused remote profile cache.
2022-06-06 13:20:05 -04:00
Erik Johnston
1e453053cb
Rename storage classes ( #12913 )
2022-05-31 12:17:50 +00:00
Patrick Cloke
a8db8c6eba
Remove user-visible groups/communities code ( #12553 )
...
Makes it so that groups/communities no longer exist from a user-POV. E.g. we remove:
* All API endpoints (including Client-Server, Server-Server, and admin).
* Documented configuration options (and the experimental flag, which is now unused).
* Special handling during room upgrades.
* The `groups` section of the `/sync` response.
2022-05-25 07:53:40 -04:00
Mathieu Velten
182ca78a12
Delete events from federation_inbound_events_staging table on purge ( #12770 )
2022-05-17 17:01:06 +00:00
Patrick Cloke
9535fd0f9c
Disable groups/communities by default. ( #12344 )
...
This disables the endpoints (and sync response fields) for
groups/communities by default.
2022-04-12 10:20:46 -04:00
Jorge Florian
2e2d8cc2f9
Update the server notices user profile in room if changed. ( #12115 )
2022-04-08 07:51:27 -04:00
Richard van der Hoff
f0b03186d9
Add type hints for `tests/unittest.py`. ( #12347 )
...
In particular, add type hints for get_success and friends, which are then helpful in a bunch of places.
2022-04-01 16:04:16 +00:00
Richard van der Hoff
33ebee47e4
Remove redundant `get_success` calls in test code ( #12346 )
...
There are a bunch of places we call get_success on an immediate value, which is unnecessary. Let's rip them out, and remove the redundant functionality in get_success and friends.
2022-04-01 16:10:31 +01:00
David Robertson
fffb3c4c8f
Always allow the empty string as an avatar_url. ( #12261 )
...
Hopefully this fixes #12257 .
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
2022-03-25 13:28:42 +00:00
Shay
ef3619e61d
Add config settings for background update parameters ( #11980 )
2022-03-11 10:46:45 -08:00
Shay
26211fec24
Fix a bug in background updates wherein background updates are never run using the default batch size ( #12157 )
2022-03-07 09:44:33 -08:00
Patrick Cloke
02d708568b
Replace assertEquals and friends with non-deprecated versions. ( #12092 )
2022-02-28 07:12:29 -05:00
Richard van der Hoff
e24ff8ebe3
Remove `HomeServer.get_datastore()` ( #12031 )
...
The presence of this method was confusing, and mostly present for backwards
compatibility. Let's get rid of it.
Part of #11733
2022-02-23 11:04:02 +00:00
Dirk Klimpel
901b264c0c
Add type hints to `tests/rest/admin` ( #11851 )
2022-01-31 14:20:05 -05:00
Dirk Klimpel
6a72c910f1
Add admin API to get a list of federated rooms ( #11658 )
2022-01-25 16:11:40 +00:00
Dirk Klimpel
0d6cfea9b8
Add admin API to reset connection timeouts for remote server ( #11639 )
...
* Fix get federation status of destination if no error occured
2022-01-25 12:06:29 +00:00
Richard van der Hoff
9f2016e96e
Drop unused table `public_room_list_stream`. ( #11795 )
...
This is a follow-up to #10565 .
2022-01-21 09:19:56 +00:00
Daniel Sonck
6b241f5286
Make pagination of rooms in admin api stable ( #11737 )
...
Always add state.room_id after the configurable ORDER BY. Otherwise,
for any sort, certain pages can contain results from
other pages. (Especially when sorting by creator, since there may
be many rooms by the same creator)
* Document different order direction of numerical fields
"joined_members", "joined_local_members", "version" and "state_events"
are ordered in descending direction by default (dir=f). Added a note
in tests to explain the differences in ordering.
Signed-off-by: Daniël Sonck <daniel@sonck.nl>
2022-01-17 11:42:51 +00:00
Andrew Morgan
18862f20b5
Remove the 'password_hash' from the Users Admin API endpoint response dictionary ( #11576 )
2022-01-14 14:53:33 +00:00
Patrick Cloke
3e0536cd2a
Replace uses of simple_insert_many with simple_insert_many_values. ( #11742 )
...
This should be (slightly) more efficient and it is simpler
to have a single method for inserting multiple values.
2022-01-13 19:44:18 -05:00
Dirk Klimpel
3b51c763ba
Fix get federation status of destination if no error occured ( #11593 )
2022-01-05 14:46:50 -05:00
Dirk Klimpel
7a1cefc6e3
Add admin API to get users' account data ( #11664 )
...
Co-authored-by: reivilibre <olivier@librepush.net>
2022-01-05 11:49:06 +00:00
Dirk Klimpel
8428ef66c7
Add type hints to `synapse/tests/rest/admin` ( #11590 )
2021-12-16 14:59:56 -05:00
Patrick Cloke
9562f0c2f1
Ensure emails are canonicalized before fetching associated user. ( #11547 )
...
This should fix pushers with an email in non-canonical form is used as
the pushkey.
2021-12-10 07:17:28 -05:00
Dirk Klimpel
b3bcacf3c1
Add missing `errcode` to `parse_string` and `parse_boolean` ( #11542 )
2021-12-09 11:23:34 +00:00
Dirk Klimpel
7ecaa3b976
Clean up `synapse.rest.admin` ( #11535 )
2021-12-08 16:59:40 +00:00
Richard van der Hoff
b1ecd19c5d
Fix 'delete room' admin api to work on incomplete rooms ( #11523 )
...
If, for some reason, we don't have the create event, we should still be able to
purge a room.
2021-12-07 11:37:54 +00:00
Dirk Klimpel
8b4b153c9e
Add admin API to get some information about federation status ( #11407 )
2021-12-06 16:59:50 +00:00