feat(plugins): plugin pages, per-user config, capabilities gate, mobile/telegram refactors

- Plugin HTTP routes + web pages (plugin-page-host, plugin-catalog, plugin-detail)
- Plugin access grants + per-user config (DB tables + API + frontend forms)
- Capabilities-based guard (caps.rs) replacing role-id checks
- Mobile connector: message routing, payload types, router refactor
- Telegram bot: auth flow, event handling improvements
- Honcho plugin: substantial rework
- Sidebar: plugin pages integration, role-driven visibility
- i18n: new strings for plugins, connectors, capabilities
- Remove unused mascot asset
This commit is contained in:
2026-07-19 20:47:09 +01:00
parent f85876350e
commit ba911ae8cb
50 changed files with 3186 additions and 305 deletions
@@ -124,6 +124,19 @@ pub(crate) async fn message_handler(
}
};
// The chat is bound, but access is a separate admin-revocable grant. Gate
// here so a revoked user is refused immediately, without touching the
// binding (a re-grant restores service with no re-pairing).
if !shared.user_authorized(&user_id).await {
bot.send_message(
chat_id,
"⛔ Your access to this bot has been withdrawn by an administrator.",
)
.await
.ok();
return Ok(());
}
// Resolve the user's per-user context (must be unlocked, §9).
let handle = match shared.user_channel.resolve_user(&user_id).await {
Some(h) => h,