feat(mcp): centralize connection access policies
This commit is contained in:
56 files changed
+6393
-617
No files matched your search
@@ -3,7 +3,7 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use dbx_core::storage::DesktopSettings;
|
||||
use dbx_core::storage::{DesktopSettings, McpGlobalPolicy, McpGlobalPolicyState};
|
||||
use tauri::{AppHandle, Manager, State, Window};
|
||||
|
||||
use super::connection::AppState;
|
||||
@@ -75,6 +75,16 @@ pub async fn save_pinned_tree_node_ids(state: State<'_, Arc<AppState>>, ids: Vec
|
||||
state.storage.save_pinned_tree_node_ids(&ids).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn load_mcp_global_policy(state: State<'_, Arc<AppState>>) -> Result<McpGlobalPolicyState, String> {
|
||||
state.storage.load_mcp_global_policy().await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn save_mcp_global_policy(state: State<'_, Arc<AppState>>, policy: McpGlobalPolicy) -> Result<(), String> {
|
||||
state.storage.save_mcp_global_policy(&policy).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn load_editor_settings(state: State<'_, Arc<AppState>>) -> Result<Option<serde_json::Value>, String> {
|
||||
state.storage.load_editor_settings().await
|
||||
|
||||
Reference in new issue
Block a user