host: the drafts vault commands (draft_list/save/revisions/status, observation_list, data_export) are the host's (AppConfig::with_vault, commands::VAULT); the app takes the vault through vault_commands::lock
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fc08bc89cb
commit
400f22c40c
6 changed files with 147 additions and 11 deletions
|
|
@ -280,6 +280,14 @@ pub fn assert_alerts_guards() {
|
|||
}
|
||||
}
|
||||
|
||||
/// The vault commands' wrappers check their caller first. Runs against the host's source.
|
||||
pub fn assert_vault_guards() {
|
||||
let source = include_str!("vault_commands.rs");
|
||||
for command in commands::VAULT {
|
||||
assert_guarded(source, command, "shell_only(&webview)?");
|
||||
}
|
||||
}
|
||||
|
||||
/// The backup commands' wrappers check their caller first. Runs against the host's source.
|
||||
pub fn assert_backup_guards() {
|
||||
let source = include_str!("backup_commands.rs");
|
||||
|
|
@ -303,6 +311,7 @@ mod tests {
|
|||
assert_backup_guards();
|
||||
assert_theme_guards();
|
||||
assert_alerts_guards();
|
||||
assert_vault_guards();
|
||||
}
|
||||
|
||||
fn caps_with(shell_extra: &str, tab_extra: &str, site_extra: &str) -> Capabilities {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue