Nightly Build / build (push) Successful in 7m1s
The generic per-user #plugins page is gone: a plugin with per-user settings hosts them in its own web_pages() sidebar page instead (Telegram's pairing page is new; Honcho's opt-in page already existed). The admin catalog moves from #plugin-catalog to #plugins (old hash redirected), and user_config_schema is removed from the Plugin trait, the API DTOs and both plugins — the my-config endpoint, the plugin_user_configs store and the update_user_config hook stay, now driven by each plugin's own page fragment.
17 lines
692 B
Rust
17 lines
692 B
Rust
use anyhow::Result;
|
|
use async_trait::async_trait;
|
|
use serde_json::Value;
|
|
|
|
/// Per-user plugin configuration store (`plugin_user_configs` table in
|
|
/// `system.db`).
|
|
///
|
|
/// Values are deliberately admin-readable — the table lives in the registry
|
|
/// database — so per-user plugin configs must never collect secrets. A plugin
|
|
/// that needs per-user secrets should keep them elsewhere.
|
|
#[async_trait]
|
|
pub trait PluginUserConfigApi: Send + Sync {
|
|
async fn get(&self, plugin_id: &str, user_id: &str) -> Result<Option<Value>>;
|
|
async fn set(&self, plugin_id: &str, user_id: &str, config: Value) -> Result<()>;
|
|
async fn delete(&self, plugin_id: &str, user_id: &str) -> Result<()>;
|
|
}
|