refactor: Represent route auth information in the type system

This commit is contained in:
Ginger committed 2026-05-26 13:28:23 -04:00
1 parent 793d399477
commit 4b75d78ac4
78 files changed
+496 -482

No files matched your search

+1 -5
View File
@@ -48,11 +48,7 @@ pub(crate) async fn get_capabilities_route(
json!({"enabled": services.config.forget_forced_upon_leave}),
)?;
if services
.users
.is_admin(body.sender_user.as_ref().unwrap())
.await
{
if services.users.is_admin(body.identity.sender_user()).await {
// Advertise suspension API
capabilities.set("uk.timedout.msc4323", json!({"suspend": true, "lock": false}))?;
}