Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Refactor media modules. (#15146) | Patrick Cloke | 2023-02-27 | 1 | -1/+1 |
| | | | | | | | * Removes the `v1` directory from `test.rest.media.v1`. * Moves the non-REST code from `synapse.rest.media.v1` to `synapse.media`. * Flatten the `v1` directory from `synapse.rest.media`, but leave compatiblity with 3rd party media repositories and spam checkers. | ||||
* | Add final type hint to tests.unittest. (#15072) | Patrick Cloke | 2023-02-14 | 1 | -2/+3 |
| | | | | Adds a return type to HomeServerTestCase.make_homeserver and deal with any variables which are no longer Any. | ||||
* | Add a class UnpersistedEventContext to allow for the batching up of storing ↵ | Shay | 2023-02-09 | 1 | -1/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | state groups (#14675) * add class UnpersistedEventContext * modify create new client event to create unpersistedeventcontexts * persist event contexts after creation * fix tests to persist unpersisted event contexts * cleanup * misc lints + cleanup * changelog + fix comments * lints * fix batch insertion? * reduce redundant calculation * add unpersisted event classes * rework compute_event_context, split into function that returns unpersisted event context and then persists it * use calculate_context_info to create unpersisted event contexts * update typing * $%#^&* * black * fix comments and consolidate classes, use attr.s for class * requested changes * lint * requested changes * requested changes * refactor to be stupidly explicit * clearer renaming and flow * make partial state non-optional * update docstrings --------- Co-authored-by: Erik Johnston <erik@matrix.org> | ||||
* | Respond with proper error responses on unknown paths. (#14621) | Patrick Cloke | 2022-12-08 | 1 | -1/+1 |
| | | | | Returns a proper 404 with an errcode of M_RECOGNIZED for unknown endpoints per MSC3743. | ||||
* | Add an Admin API endpoint for looking up users based on 3PID (#14405) | Ashish Kumar | 2022-11-11 | 1 | -13/+94 |
| | |||||
* | Show erasure status when listing users in the Admin API (#14205) | Tadeusz Sośnierz | 2022-10-21 | 1 | -1/+34 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 30bd2bf106415caadcfdbdd1b234ef2b106cc394. * 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> | ||||
* | Allow admins to require a manual approval process before new accounts can be ↵ | Brendan Abolivier | 2022-09-29 | 1 | -2/+184 |
| | | | | used (using MSC3866) (#13556) | ||||
* | Support enabling/disabling pushers (from MSC3881) (#13799) | Brendan Abolivier | 2022-09-21 | 1 | -1/+1 |
| | | | Partial implementation of MSC3881 | ||||
* | Add an admin API endpoint to find a user based on its external ID in an auth ↵ | Quentin Gliech | 2022-09-16 | 1 | -0/+87 |
| | | | | provider. (#13810) | ||||
* | Add timestamp to user's consent (#13741) | Dirk Klimpel | 2022-09-08 | 1 | -0/+1 |
| | | | Co-authored-by: reivilibre <olivier@librepush.net> | ||||
* | Implement MSC3852: Expose `last_seen_user_agent` to users for their own ↵ | Andrew Morgan | 2022-08-19 | 1 | -1/+91 |
| | | | | devices; also expose to Admin API (#13549) | ||||
* | Use literals in place of `HTTPStatus` constants in tests (#13488) | Dirk Klimpel | 2022-08-10 | 1 | -54/+53 |
| | | | | | | | | | * Use literals in place of `HTTPStatus` constants in tests * newsfile * code style * code style | ||||
* | Use literals in place of `HTTPStatus` constants in tests (#13479) | Dirk Klimpel | 2022-08-09 | 1 | -52/+52 |
| | | | | | | | | | | Replace - `HTTPStatus.NOT_FOUND` - `HTTPStatus.FORBIDDEN` - `HTTPStatus.UNAUTHORIZED` - `HTTPStatus.CONFLICT` - `HTTPStatus.CREATED` Signed-off-by: Dirk Klimpel <dirk@klimpel.org> | ||||
* | Use literals in place of `HTTPStatus` constants in tests (#13469) | Dirk Klimpel | 2022-08-08 | 1 | -119/+119 |
| | |||||
* | Use HTTPStatus constants in place of literals in tests. (#13297) | Dirk Klimpel | 2022-07-15 | 1 | -8/+8 |
| | |||||
* | Fix "add user" admin api error when request contains a "msisdn" threepid ↵ | Thomas Weston | 2022-07-13 | 1 | -0/+35 |
| | | | | | | (#13263) Co-authored-by: Thomas Weston <thomas.weston@clearspancloud.com> Co-authored-by: David Robertson <david.m.robertson1@gmail.com> | ||||
* | annotate tests.server.FakeChannel (#13136) | David Robertson | 2022-07-04 | 1 | -1/+1 |
| | |||||
* | Rename storage classes (#12913) | Erik Johnston | 2022-05-31 | 1 | -2/+2 |
| | |||||
* | Add type hints for `tests/unittest.py`. (#12347) | Richard van der Hoff | 2022-04-01 | 1 | -6/+9 |
| | | | In particular, add type hints for get_success and friends, which are then helpful in a bunch of places. | ||||
* | Always allow the empty string as an avatar_url. (#12261) | David Robertson | 2022-03-25 | 1 | -0/+19 |
| | | | | | Hopefully this fixes #12257. Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> | ||||
* | Remove `HomeServer.get_datastore()` (#12031) | Richard van der Hoff | 2022-02-23 | 1 | -10/+10 |
| | | | | | | | The presence of this method was confusing, and mostly present for backwards compatibility. Let's get rid of it. Part of #11733 | ||||
* | Add type hints to `tests/rest/admin` (#11851) | Dirk Klimpel | 2022-01-31 | 1 | -129/+133 |
| | |||||
* | Remove the 'password_hash' from the Users Admin API endpoint response ↵ | Andrew Morgan | 2022-01-14 | 1 | -17/+33 |
| | | | | dictionary (#11576) | ||||
* | Add admin API to get users' account data (#11664) | Dirk Klimpel | 2022-01-05 | 1 | -0/+90 |
| | | | Co-authored-by: reivilibre <olivier@librepush.net> | ||||
* | Ensure emails are canonicalized before fetching associated user. (#11547) | Patrick Cloke | 2021-12-10 | 1 | -1/+2 |
| | | | | This should fix pushers with an email in non-canonical form is used as the pushkey. | ||||
* | Add missing `errcode` to `parse_string` and `parse_boolean` (#11542) | Dirk Klimpel | 2021-12-09 | 1 | -6/+6 |
| | |||||
* | Add type hints to `synapse/tests/rest/admin` (#11501) | Dirk Klimpel | 2021-12-03 | 1 | -18/+18 |
| | |||||
* | Convert status codes to `HTTPStatus` in `tests.rest.admin` (#11455) | Dirk Klimpel | 2021-11-30 | 1 | -211/+218 |
| | |||||
* | Rename `get_access_token_for_user_id` method to ↵ | reivilibre | 2021-11-17 | 1 | -2/+2 |
| | | | | `create_access_token_for_user_id` (#11369) | ||||
* | Add ability to un-shadow-ban via the admin API. (#11347) | Patrick Cloke | 2021-11-16 | 1 | -6/+20 |
| | |||||
* | Enable changing user type via users admin API (#11174) | Jason Robinson | 2021-10-26 | 1 | -0/+51 |
| | | | | | | | | Users admin API can now also modify user type in addition to allowing it to be set on user creation. Signed-off-by: Jason Robinson <jasonr@matrix.org> Co-authored-by: Brendan Abolivier <babolivier@matrix.org> | ||||
* | Fix setting a user's external_id via the admin API returns 500 and deletes ↵ | Dirk Klimpel | 2021-10-21 | 1 | -3/+212 |
| | | | | | users existing external mappings if that external ID is already mapped (#11051) Fixes #10846 | ||||
* | Simplify the user admin API tests (#11048) | Dirk Klimpel | 2021-10-12 | 1 | -255/+146 |
| | |||||
* | Use direct references for configuration variables (part 7). (#10959) | Patrick Cloke | 2021-10-04 | 1 | -2/+2 |
| | |||||
* | Use direct references for configuration variables (part 6). (#10916) | Patrick Cloke | 2021-09-29 | 1 | -3/+3 |
| | |||||
* | Use direct references for configuration variables (part 5). (#10897) | Patrick Cloke | 2021-09-24 | 1 | -1/+1 |
| | |||||
* | Add reactor to `SynapseRequest` and fix up types. (#10868) | Erik Johnston | 2021-09-24 | 1 | -1/+1 |
| | |||||
* | Create a constant for a small png image in tests. (#10834) | Patrick Cloke | 2021-09-16 | 1 | -15/+4 |
| | | | To avoid duplicating it between a few tests. | ||||
* | Remove not needed database updates in modify user admin API (#10627) | Dirk Klimpel | 2021-08-19 | 1 | -4/+58 |
| | |||||
* | Flatten the synapse.rest.client package (#10600) | reivilibre | 2021-08-17 | 1 | -2/+1 |
| | |||||
* | Allow to edit `external_ids` by Edit User admin API (#10598) | Dirk Klimpel | 2021-08-17 | 1 | -30/+197 |
| | | | Signed-off-by: Dirk Klimpel dirk@klimpel.org | ||||
* | Admin API to delete media for a specific user (#10558) | Dirk Klimpel | 2021-08-11 | 1 | -113/+208 |
| | |||||
* | Add `creation_ts` to list users admin API (#10448) | Dirk Klimpel | 2021-07-22 | 1 | -18/+27 |
| | | | Signed-off-by: Dirk Klimpel dirk@klimpel.org | ||||
* | Fix deactivate a user if he does not have a profile (#10252) | Dirk Klimpel | 2021-07-06 | 1 | -18/+68 |
| | |||||
* | Add SSO `external_ids` to Query User Account admin API (#10261) | Dirk Klimpel | 2021-07-01 | 1 | -84/+140 |
| | | | Related to #10251 | ||||
* | Remove various bits of compatibility code for Python <3.6 (#9879) | Andrew Morgan | 2021-04-27 | 1 | -9/+6 |
| | | | I went through and removed a bunch of cruft that was lying around for compatibility with old Python versions. This PR also will now prevent Synapse from starting unless you're running Python 3.6+. | ||||
* | Fix (final) Bugbear violations (#9838) | Jonathan de Jong | 2021-04-20 | 1 | -2/+2 |
| | |||||
* | Remove redundant "coding: utf-8" lines (#9786) | Jonathan de Jong | 2021-04-14 | 1 | -1/+0 |
| | | | | | | | Part of #9744 Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now. `Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>` | ||||
* | Add an admin API to manage ratelimit for a specific user (#9648) | Dirk Klimpel | 2021-04-13 | 1 | -0/+284 |
| | |||||
* | Use mock from the stdlib. (#9772) | Patrick Cloke | 2021-04-09 | 1 | -2/+1 |
| | |||||
* | Add `order_by` to list user admin API (#9691) | Dirk Klimpel | 2021-04-01 | 1 | -1/+120 |
| | |||||
* | Consistently check whether a password may be set for a user. (#9636) | Dirk Klimpel | 2021-03-18 | 1 | -55/+118 |
| | |||||
* | Add an `order_by` field to list users' media admin API. (#8978) | Dirk Klimpel | 2021-02-22 | 1 | -21/+225 |
| | |||||
* | Add the shadow-banning status to the display user admin API. (#9400) | Dirk Klimpel | 2021-02-17 | 1 | -0/+2 |
| | |||||
* | Update black, and run auto formatting over the codebase (#9381) | Eric Eastwood | 2021-02-16 | 1 | -84/+264 |
| | | | | | | | - Update black version to the latest - Run black auto formatting over the codebase - Run autoformatting according to [`docs/code_style.md `](https://github.com/matrix-org/synapse/blob/80d6dc9783aa80886a133756028984dbf8920168/docs/code_style.md) - Update `code_style.md` docs around installing black to use the correct version | ||||
* | Add an admin API for shadow-banning users. (#9209) | Patrick Cloke | 2021-01-25 | 1 | -0/+64 |
| | | | | | | | | | | This expands the current shadow-banning feature to be usable via the admin API and adds documentation for it. A shadow-banned users receives successful responses to their client-server API requests, but the events are not propagated into rooms. Shadow-banning a user should be used as a tool of last resort and may lead to confusing or broken behaviour for the client. | ||||
* | Add tests for List Users Admin API (#9045) | Dirk Klimpel | 2021-01-21 | 1 | -27/+196 |
| | |||||
* | Remove user's avatar URL and displayname when deactivated. (#8932) | Dirk Klimpel | 2021-01-12 | 1 | -0/+220 |
| | | | This only applies if the user's data is to be erased. | ||||
* | Also support remote users on the joined_rooms admin API. (#8948) | David Teller | 2021-01-11 | 1 | -6/+52 |
| | | | | For remote users, only the rooms which the server knows about are returned. Local users have all of their joined rooms returned. | ||||
* | Removes unnecessary declarations in the tests for the admin API. (#9063) | Dirk Klimpel | 2021-01-11 | 1 | -5/+0 |
| | |||||
* | Fix `UsersListTestCase` (#8964) | Richard van der Hoff | 2020-12-17 | 1 | -6/+4 |
| | |||||
* | Fix a bug that deactivated users appear in the directory (#8933) | Dirk Klimpel | 2020-12-17 | 1 | -1/+49 |
| | | | | | | | | | | Fixes a bug that deactivated users appear in the directory when their profile information was updated. To change profile information of deactivated users is neccesary for example you will remove displayname or avatar. But they should not appear in directory. They are deactivated. Co-authored-by: Erik Johnston <erikj@jki.re> | ||||
* | Make search statement in List Room and User Admin API case-insensitive (#8931) | Dirk Klimpel | 2020-12-17 | 1 | -3/+98 |
| | |||||
* | Convert internal pusher dicts to attrs classes. (#8940) | Patrick Cloke | 2020-12-16 | 1 | -1/+1 |
| | | | This improves type hinting and should use less memory. | ||||
* | Remove spurious "SynapseRequest" result from `make_request" | Richard van der Hoff | 2020-12-15 | 1 | -193/+121 |
| | | | | This was never used, so let's get rid of it. | ||||
* | Call set_avatar_url with target_user, not user_id (#8872) | Will Hunt | 2020-12-07 | 1 | -1/+6 |
| | | | | | | | | | | | | | | | | | | | | * Call set_avatar_url with target_user, not user_id Fixes https://github.com/matrix-org/synapse/issues/8871 * Create 8872.bugfix * Update synapse/rest/admin/users.py Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> * Testing * Update changelog.d/8872.bugfix Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com> Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | ||||
* | Add additional validation to pusher URLs. (#8865) | Patrick Cloke | 2020-12-04 | 1 | -1/+1 |
| | | | | Pusher URLs now must end in `/_matrix/push/v1/notify` per the specification. | ||||
* | Remove deprecated `/_matrix/client/*/admin` endpoints (#8785) | Dirk Klimpel | 2020-11-25 | 1 | -1/+109 |
| | | | These are now only available via `/_synapse/admin/v1`. | ||||
* | Fix tests on develop (#8777) | Erik Johnston | 2020-11-18 | 1 | -16/+0 |
| | | | This was broken due to #8617 and #8761. | ||||
* | Merge pull request #8761 from matrix-org/rav/test_request_rendering | Richard van der Hoff | 2020-11-17 | 1 | -95/+0 |
|\ | | | | | Make `make_request` actually render the request | ||||
| * | Remove redundant `HomeserverTestCase.render` | Richard van der Hoff | 2020-11-16 | 1 | -95/+0 |
| | | |||||
* | | Add admin API for logging in as a user (#8617) | Erik Johnston | 2020-11-17 | 1 | -2/+243 |
|/ | |||||
* | Add `displayname` to Shared-Secret Registration for admins (#8722) | Dirk Klimpel | 2020-11-05 | 1 | -2/+119 |
| | | | Add `displayname` to Shared-Secret Registration for admins to `POST /_synapse/admin/v1/register` | ||||
* | Fix unit tests (#8689) | Erik Johnston | 2020-10-29 | 1 | -1/+1 |
| | | | | | * Fix unit tests * Newsfile | ||||
* | Add an admin APIs to allow server admins to list users' pushers (#8610) | Dirk Klimpel | 2020-10-28 | 1 | -0/+124 |
| | | | Add an admin API `GET /_synapse/admin/v1/users/<user_id>/pushers` like https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-pushers | ||||
* | Add admin API to list users' local media (#8647) | Dirk Klimpel | 2020-10-27 | 1 | -0/+282 |
| | | | Add admin API `GET /_synapse/admin/v1/users/<user_id>/media` to get information of users' uploaded files. | ||||
* | Fix a bug in the joined_rooms admin API (#8643) | Dirk Klimpel | 2020-10-26 | 1 | -1/+15 |
| | | | | If the user was not in any rooms then the API returned the same error as if the user did not exist. | ||||
* | Fixed a bug with reactivating users with the admin API (#8362) | Dirk Klimpel | 2020-09-22 | 1 | -0/+14 |
| | | | | | | | Fixes: #8359 Trying to reactivate a user with the admin API (`PUT /_synapse/admin/v2/users/<user_name>`) causes an internal server error. Seems to be a regression in #8033. | ||||
* | Admin API for querying rooms where a user is a member (#8306) | Dirk Klimpel | 2020-09-18 | 1 | -2/+94 |
| | | | | Add a new admin API `GET /_synapse/admin/v1/users/<user_id>/joined_rooms` to list all rooms where a user is a member. | ||||
* | Allow for make_awaitable's return value to be re-used. (#8261) | Patrick Cloke | 2020-09-08 | 1 | -3/+3 |
| | |||||
* | Convert stats and related calls to async/await (#8192) | Patrick Cloke | 2020-08-27 | 1 | -5/+4 |
| | |||||
* | Convert synapse.api to async/await (#8031) | Patrick Cloke | 2020-08-06 | 1 | -3/+7 |
| | |||||
* | Allow accounts to be re-activated from the admin APIs. (#7847) | Patrick Cloke | 2020-07-15 | 1 | -0/+47 |
| | |||||
* | Allow new users to be registered via the admin API even if the monthly ↵ | Dirk Klimpel | 2020-06-05 | 1 | -15/+163 |
| | | | | active user limit has been reached (#7263) | ||||
* | Email notifications for new users when creating via the Admin API. (#7267) | Dirk Klimpel | 2020-06-01 | 1 | -0/+75 |
| | |||||
* | Return total number of users and profile attributes in admin users endpoint ↵ | Manuel Stahl | 2020-04-28 | 1 | -0/+2 |
| | | | | | (#6881) Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de> | ||||
* | Fixed set a user as an admin with the new API (#6928) | Dirk Klimpel | 2020-02-28 | 1 | -32/+186 |
| | | | Fix #6910 | ||||
* | Ensure 'deactivated' parameter is a boolean on user admin API, Fix error ↵ | Andrew Morgan | 2020-02-26 | 1 | -0/+59 |
| | | | | handling of call to deactivate user (#6990) | ||||
* | Return a 404 for admin api user lookup if user not found (#6901) | Andrew Morgan | 2020-02-12 | 1 | -0/+16 |
| | |||||
* | Admin api to add an email address (#6789) | Dirk Klimpel | 2020-02-07 | 1 | -2/+17 |
| | |||||
* | Fix changing password via user admin API. (#6730) | Erik Johnston | 2020-01-20 | 1 | -0/+13 |
| | |||||
* | Allow admin users to create or modify users without a shared secret (#6495) | Manuel Stahl | 2020-01-09 | 1 | -0/+465 |
Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de> |