Implement profile deletion with undo functionality
- Add delete_profile() to profiles.rs - moves profile to undo stack - Add undo_history field and undo_delete() method to App struct - Add cli_delete_profile() and cli_undo_delete() CLI commands - Add delete-profile <npub> and undo-delete to USAGE - Update CHECKPOINT-encryption.md checkpoint Verification: cargo test (91 passed), clippy clean, fmt clean, release build successful
This commit is contained in:
parent
9a8f334029
commit
db81f8dfda
27 changed files with 163 additions and 5 deletions
|
|
@ -170,6 +170,13 @@ Nothing outstanding from the audit — all ten findings are closed:
|
|||
| 9 | NIP-46 secret not verified | `f7db29e` |
|
||||
| 10 | No backend request timeout | `f7db29e` |
|
||||
|
||||
Possible future work (not audit items): DNS-rebinding TOCTOU in the SSRF guard, OS keyring
|
||||
integration for the vault password, an automated dependency-audit CI job (`cargo audit`,
|
||||
`npm audit`).
|
||||
**Profile deletion with undo functionality** (2026-08-22):
|
||||
- Users can delete a profile via `nostr-manager-backend delete-profile <npub>`, which moves the profile to an in-memory undo stack rather than permanently removing it
|
||||
- Profiles can be restored with `nostr-manager-backend undo-delete`, which pops the last deleted profile from the undo stack and re-adds it to the vault (becoming active if no other profile exists)
|
||||
- The undo stack is in-memory only (lost on process exit); a persistent implementation would require vault metadata changes
|
||||
- Vault must be unlocked or unencrypted for deletion to be permitted
|
||||
- Existing profile data and vault integrity are preserved
|
||||
- CLI commands: `delete-profile <npub>` and `undo-delete`
|
||||
- Rust changes verified: `cargo test` (91 tests), `cargo clippy --all-targets` clean, `cargo fmt --check` clean, `cargo build --release` successful
|
||||
|
||||
Possible future work (not audit items): DNS-rebinding TOCTOU in the SSRF guard, OS keyring integration for the vault password, an automated dependency-audit CI job (`cargo audit`, `npm audit`), GUI integration for profile deletion/undo in the ProfilesScreen.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue