Quentin Gliech
cfa9a23d86
Merge branch 'main' into feat/allow_override_user
2025-07-21 17:03:35 +02:00
Quentin Gliech
832244675d
Threaten to switch to using the modern API in a few releases.
2025-07-21 13:15:48 +02:00
Quentin Gliech
4c5b7d05b4
Avoid a few unnecessary clones when talking to Synapse
2025-07-21 13:14:38 +02:00
Quentin Gliech
fbcfa25cba
Remove the spurious password field from the request body
2025-07-21 13:08:36 +02:00
olivier
d30dd1e766
simplify unit tests
2025-07-21 11:32:54 +02:00
Quentin Gliech
5a32f00901
Rename create_device -> upsert_device
2025-07-21 10:54:40 +02:00
olivier
87ac7a1989
remove unused function
2025-07-21 10:19:57 +02:00
olivier
776da31c52
fix err return
2025-07-21 10:13:04 +02:00
Olivier D and Quentin Gliech
3e9d572e2f
Update crates/handlers/src/upstream_oauth2/link.rs
...
Co-authored-by: Quentin Gliech <quenting@element.io >
2025-07-21 09:52:24 +02:00
Olivier D and Quentin Gliech
2866f7994d
Update crates/handlers/src/upstream_oauth2/link.rs
...
Co-authored-by: Quentin Gliech <quenting@element.io >
2025-07-21 09:52:24 +02:00
olivier
c7b57f7d4c
fix rust style
2025-07-21 09:52:24 +02:00
olivier
0a0c062574
add semi column
2025-07-21 09:52:24 +02:00
Olivier D and Quentin Gliech
fcfbc5176a
fix code style
...
Co-authored-by: Quentin Gliech <quenting@element.io >
2025-07-21 09:52:24 +02:00
Olivier D and Quentin Gliech
23c97e5931
Update crates/handlers/src/upstream_oauth2/link.rs
...
Co-authored-by: Quentin Gliech <quenting@element.io >
2025-07-21 09:52:24 +02:00
Olivier D and Quentin Gliech
cdc75ffbf3
use match
...
Co-authored-by: Quentin Gliech <quenting@element.io >
2025-07-21 09:52:24 +02:00
mcalinghee
3644d4c0bf
rename is_forced to is_forced_or_required
2025-07-21 09:52:24 +02:00
mcalinghee
3774850c94
use of UpstreamOAuthProviderLocalpartPreference
2025-07-21 09:52:24 +02:00
mcalinghee
98912f4ada
allow importing existing users when the localpart matches in upstream OAuth 2.0 logins
2025-07-21 09:52:24 +02:00
Quentin Gliech
c649603830
Use the new dedicated Synapse API
2025-07-18 16:39:24 +02:00
Quentin Gliech
8af1b7a3fa
Take the localpart instead of the MXID in HomeserverConnection methods
2025-07-18 16:39:24 +02:00
Quentin Gliech
23797eef2c
Merge branch 'main' into quenting/rust-1.87
2025-07-17 09:22:28 +02:00
Quentin Gliech
b8480b1c97
Support M_USER_LOCKED error for compat sessions ( #4789 )
2025-07-17 09:17:14 +02:00
Quentin Gliech
b83c747f37
Allow skipping GDPR-erasure when deactivating a user through the admin API ( #4744 )
2025-07-17 09:15:25 +02:00
Quentin Gliech
176c05938f
New admin API endpoint to reactivate users & align what lock/unlock/deactivate does in the admin API ( #4768 )
2025-07-17 09:11:32 +02:00
Quentin Gliech
52c3a36bac
Make the admin API provision users synchronously ( #4788 )
2025-07-17 09:07:41 +02:00
Andrew Ferrazzutti
8ac2770cf7
Revert GraphQL's unlock to also reactivate
...
Unlike the CLI and admin API, leave the behaviour of the GraphQL's
unlock handler unchanged from before, so as to not break internal
tooling that depends on it.
Also update its documentation description to make note of the fact that
it reactivates in addition to unlocks.
2025-07-16 14:17:01 -04:00
Andrew Ferrazzutti
d807975137
Decouple (un)locking from (re/de)activation
...
Unify the admin API, CLI, and GraphQL API in not having the unlock
command also reactivate, or the deactivate command also lock.
Still let the unlock command of the CLI and GraphQL API to also
reactivate the target user, albeit as a non-default option.
2025-07-16 14:17:01 -04:00
Andrew Ferrazzutti
df8032695a
Satisfy Clippy
2025-07-16 14:17:01 -04:00
Andrew Ferrazzutti
eca22d335b
Format
2025-07-16 14:17:01 -04:00
Andrew Ferrazzutti
6c1afee13d
Separate active state from lock state in admin API
...
- Allow the admin API to deactivate a user without locking it, and to
unlock a user without reactivating it.
- Make unlock-and-reactivate flows unset the "deactivated_at" timestamp.
- Revert adding an "unlock" parameter on `ReactivateUserJob`, as the
option is used only by the admin API which doesn't use a job.
2025-07-16 14:17:01 -04:00
Andrew Ferrazzutti
a8b8c8e31c
Add admin API endpoint to reactivate user
2025-07-16 14:17:01 -04:00
Andrew Ferrazzutti
6183cae84e
Format
2025-07-16 13:42:14 -04:00
Andrew Ferrazzutti
05827d1e40
Don't return locked error for deactivated users
...
When a user is both locked and deactivated, give precedence to
deactivation errors over locked errors, as a locked error suggests that
unlocking the user would make it available.
2025-07-16 13:38:15 -04:00
Quentin Gliech
ed566a9fbf
Use Path::display() instead of the debug representation
2025-07-16 19:23:06 +02:00
Quentin Gliech
3076276171
Rename Claim::claim to Claim::value
2025-07-16 19:23:06 +02:00
Quentin Gliech
63a47aa41b
Box all the figment errors to avoid large enum differences
2025-07-16 19:23:06 +02:00
Quentin Gliech
e2aad08006
Miscellaneous housekeeping ( #4735 )
2025-07-16 18:53:59 +02:00
Andrew Ferrazzutti
0d613a5203
Always add users synchronously with admin API
2025-07-15 12:08:47 -04:00
Andrew Ferrazzutti
d9d424323c
Let admin API add users synchronously
...
as opposed to always launching an asynchronous worker job.
This allows callers to have a guarantee that the user is fully created
by the time it receives the response to the user creation request.
2025-07-15 12:08:33 -04:00
Andrew Ferrazzutti
d7037c5599
Satisfy Clippy
2025-07-15 11:19:41 -04:00
Andrew Ferrazzutti
82e3ea6c9b
Add test coverage
...
Also update snapshots for token values affected by state changes
2025-07-15 11:19:19 -04:00
Andrew Ferrazzutti
8e19d986cf
Check for compat session locking earlier
2025-07-15 11:19:19 -04:00
Andrew Ferrazzutti
8dedf6b25a
Support M_USER_LOCKED error for compat sessions
2025-07-15 11:19:19 -04:00
Andrew Ferrazzutti
49f2daeaa9
Negate erase option and make optional
...
This makes it more intuitive for an empty request body to be equivalent
to the option being set to false.
2025-07-14 01:02:51 -04:00
Andrew Ferrazzutti
bad090adb5
Merge with 'main'
2025-07-11 09:50:38 -04:00
Quentin Gliech
57af270ffa
Allow running jobs from the job queue in tests ( #4775 )
2025-07-11 14:47:23 +02:00
Andrew Ferrazzutti
1101dd95e8
Force optional request body for JSON schema
2025-07-10 13:26:58 -04:00
matrixbot
1c36430035
Automatic merge back to main ( #4781 )
2025-07-10 17:28:11 +02:00
Quentin Gliech
80f2ceaa9d
Make email address lookups case-insensitive ( #4763 )
2025-07-10 17:12:54 +02:00
Quentin Gliech
e955ecc2dd
Use an async-aware mutex for the test queue worker
2025-07-09 18:30:12 +02:00