Add option to disable encryption when key is forgotten (#371)

This commit is contained in:
Gregory Schier
2026-01-26 15:40:02 -08:00
committed by GitHub
parent 4e15ac10a6
commit 8969748c3c
5 changed files with 87 additions and 1 deletions

View File

@@ -100,6 +100,15 @@ pub(crate) async fn cmd_set_workspace_key<R: Runtime>(
Ok(())
}
#[command]
pub(crate) async fn cmd_disable_encryption<R: Runtime>(
window: WebviewWindow<R>,
workspace_id: &str,
) -> Result<()> {
window.crypto().disable_encryption(workspace_id)?;
Ok(())
}
#[command]
pub(crate) fn cmd_default_headers() -> Vec<HttpRequestHeader> {
default_headers()

View File

@@ -1722,6 +1722,7 @@ pub fn run() {
// Migrated commands
crate::commands::cmd_decrypt_template,
crate::commands::cmd_default_headers,
crate::commands::cmd_disable_encryption,
crate::commands::cmd_enable_encryption,
crate::commands::cmd_get_themes,
crate::commands::cmd_reveal_workspace_key,