mirror of
https://gitlab.com/famedly/conduit.git
synced 2025-08-11 17:50:59 +00:00
feat: MSC4289, Explicitly privilege room creators (2/2)
This commit is contained in:
parent
bc5145f092
commit
4b833037ea
3 changed files with 14 additions and 18 deletions
22
Cargo.lock
generated
22
Cargo.lock
generated
|
@ -2521,7 +2521,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma"
|
||||
version = "0.12.6"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"assign",
|
||||
"js_int",
|
||||
|
@ -2540,7 +2540,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-appservice-api"
|
||||
version = "0.12.2"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"js_int",
|
||||
"ruma-common",
|
||||
|
@ -2552,7 +2552,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-client-api"
|
||||
version = "0.20.4"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"assign",
|
||||
|
@ -2575,7 +2575,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-common"
|
||||
version = "0.15.4"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"base64 0.22.1",
|
||||
|
@ -2607,7 +2607,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-events"
|
||||
version = "0.30.5"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"as_variant",
|
||||
"indexmap 2.9.0",
|
||||
|
@ -2631,7 +2631,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-federation-api"
|
||||
version = "0.11.2"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"headers",
|
||||
|
@ -2653,7 +2653,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-identifiers-validation"
|
||||
version = "0.10.1"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"js_int",
|
||||
"thiserror 2.0.12",
|
||||
|
@ -2662,7 +2662,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-macros"
|
||||
version = "0.15.2"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"proc-macro-crate",
|
||||
|
@ -2677,7 +2677,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-push-gateway-api"
|
||||
version = "0.11.0"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"js_int",
|
||||
"ruma-common",
|
||||
|
@ -2689,7 +2689,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-signatures"
|
||||
version = "0.17.1"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"ed25519-dalek",
|
||||
|
@ -2705,7 +2705,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "ruma-state-res"
|
||||
version = "0.13.0"
|
||||
source = "git+https://github.com/ruma/ruma.git#d6a03802a457e2b6173920bb9beb8ae49291c71b"
|
||||
source = "git+https://github.com/ruma/ruma.git#69914f4a34da2eb6bedc6481db1674abee74be36"
|
||||
dependencies = [
|
||||
"js_int",
|
||||
"ruma-common",
|
||||
|
|
|
@ -1386,7 +1386,7 @@ impl Service {
|
|||
// events are then sorted by power level, time,
|
||||
// and lexically by event_id.
|
||||
Ok((
|
||||
int!(0),
|
||||
int!(0).into(),
|
||||
MilliSecondsSinceUnixEpoch(
|
||||
eventid_info
|
||||
.get(event_id)
|
||||
|
|
|
@ -488,15 +488,11 @@ impl Service {
|
|||
.authorization;
|
||||
|
||||
room_create
|
||||
// NOTE: This is because project hydra's client-side was made public before the server
|
||||
// side. This will be fixed by using `creators` instead in part 2/2.
|
||||
.creator(&rules)
|
||||
.creators(&rules)
|
||||
.map_err(|e| {
|
||||
error!("Failed to get creators of room id {}: {e}", room_id);
|
||||
Error::BadDatabase("RoomCreateEvent has invalid creators")
|
||||
})
|
||||
.map(|creator| {
|
||||
RoomPowerLevels::new(power_levels.into(), &rules, [creator.into_owned()])
|
||||
})
|
||||
.map(|creators| RoomPowerLevels::new(power_levels.into(), &rules, creators))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue