Bug 385444

Summary: Add Ability to Delete a Vault via GUI
Product: [Plasma] Plasma Vault Reporter: Michael Tunnell <m>
Component: generalAssignee: Ivan Čukić <ivan.cukic>
Status: RESOLVED FIXED    
Severity: normal CC: bastian.beischer, blueball, charles.v.wright, cryptodude, nate, simonandric5
Priority: NOR Keywords: usability
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.13

Description Michael Tunnell 2017-10-06 17:40:13 UTC
At the moment, it seems the only way to delete a vault is to manually perform the following:

1. Delete the folder ~/Vaults/Vault_NAME
2. Delete the folder ~/.vaults/Vault_NAME.enc
3. Delete the entry for the vault inside of ~/.config/plasmavaultrc

There isn't any documentation as to how to do this that I could find and the git log seems to have previously had a "dismantle" option that was removed.

I think this is an important feature to have as soon as possible.
Comment 1 Ivan Čukić 2017-10-06 20:12:03 UTC
I agree it is important. And it will be released with 5.12.

The reason why it is not released is that I'm a bit torn about what 'dismantling' should do.

I'm leaning towards having 'dismantle' just unregister (your third step) the vault and force the user to delete the directories manually (with this stated in the UI so that the user does not have any surprises).

My main rule with PV is to approach everything from the data-safety point first, and then user convenience.

Thoughts?

(p.s. I didn't expect people immediately wanting to delete vaults -- I forgot that people will want to test how the things work :) )
Comment 2 Nate Graham 2017-10-06 20:20:10 UTC
I don't agree that users should have to use the file system or a terminal to delete vaults. The UI should make it clear that deleting a vault with information in it is a destructive action, and we should provide an undo for mistakes. Beyond that, we ought to treat users as adults capable of making their own decision (so we should let them delete vaults) and whose time is valuable (so they shouldn't have to muck around in the file system and learn how to do it manually).
Comment 3 Michael Tunnell 2017-10-07 15:51:10 UTC
@Ivan Čukić
> I'm leaning towards having 'dismantle' just unregister (your third step) the vault and force the user to delete the directories manually (with this stated in the UI so that the user does not have any surprises).

I think there should be an offer of Dismantle and Delete. Dismantling doing as you suggest where it just removes the entry but the data is fine. Deleting would be a full delete of entry and files/folders.

@Nate Graham 
> The UI should make it clear that deleting a vault with information in it is a destructive action, and we should provide an undo for mistakes.

This could be approached in the way Dolphin has Delete & Shift+Delete for permanent deletion.

> we ought to treat users as adults capable of making their own decision and whose time is valuable.

This *exactly this*. So often I've seen projects insist that something can't be done because of fear that "it is too destructive" which of course is replied by the user with "yes, that is exactly the point of why I want it."
Comment 4 Ivan Čukić 2017-10-07 16:15:11 UTC
Ok. I'm convinced :)
Comment 5 naraesk 2017-10-18 09:44:53 UTC
I'd suggest that to delete a vault the user needs to enter the name of the vault instead of simpley clicking an Ok button. This minimizes the risk of deleting the wrong vault by accident.
Comment 6 cryptodude 2017-10-20 11:56:19 UTC
Maybe you can just hard delete the mountpoint and move the vault backing dir into the kde trash. Then you can have an 'undelete' button as well inside of your value UI.
Comment 7 Nate Graham 2017-10-20 13:07:40 UTC
That's a really great idea, cryptodude.
Comment 8 vinnywright 2017-10-20 22:09:14 UTC
well nice to see this is going to be fixed ,,as I could find no way to delete/remove a test vault .

the user IS told that forgetting the password will result in non recoverable data loss so I think just destroying the vault and data IS the option .

will this be "fixed" as an update to the installed plasma-vault?
Comment 9 Nate Graham 2017-10-20 22:12:29 UTC
Once the feature is implemented, yes.
Comment 10 vinnywright 2017-10-20 22:51:41 UTC
(In reply to Nate Graham from comment #9)
> Once the feature is implemented, yes.

cool ,,,other than that it seems to work nicely.
Comment 11 vinnywright 2018-02-08 22:27:03 UTC
so has their been any work on this ?
it's been quite a wile now ,,,,,,,,,,
Comment 12 Ivan Čukić 2018-02-09 11:43:27 UTC
It will be a part of the release after the LTS. Didn't want to add new features in this one - just polish and bug fixes.
Comment 13 vinnywright 2018-02-09 21:31:01 UTC
(In reply to Ivan Čukić from comment #12)
> It will be a part of the release after the LTS. Didn't want to add new
> features in this one - just polish and bug fixes.

cool ,,,just curious ,,,and some people were asking about it on the forum I hang out on https://www.kubuntuforums.net/showthread.php/72484-Where-is-Plasma-Vault?p=410320#post410320

thank you for the quick reply :)
Comment 14 Ivan Čukić 2018-04-10 21:23:32 UTC
Git commit eadb8c0689fd6d8bf55a758471ce75cb9b982849 by Ivan Čukić.
Committed on 10/04/2018 at 21:22.
Pushed by ivan into branch 'master'.

Added vault deletion through the configuration dialogue

A  +89   -0    asynqt/private/wrappers/kjob_p.h     [License: LGPL]
A  +51   -0    asynqt/wrappers/kjob.h     [License: LGPL]
M  +3    -2    common/vaultinfo.h
M  +2    -0    kded/CMakeLists.txt
M  +3    -3    kded/engine/backend_p.h
M  +2    -1    kded/engine/commandresult.h
M  +19   -7    kded/engine/fusebackend_p.cpp
M  +3    -3    kded/engine/fusebackend_p.h
M  +52   -37   kded/engine/vault.cpp
M  +1    -1    kded/engine/vault.h
M  +45   -1    kded/service.cpp
M  +3    -0    kded/service.h
M  +18   -4    kded/ui/dialogdsl.cpp
M  +2    -0    kded/ui/dialogdsl.h
M  +2    -0    kded/ui/directorychooserwidget.cpp
M  +6    -0    kded/ui/namechooserwidget.cpp
M  +24   -10   kded/ui/vaultconfigurationwizard.cpp
A  +95   -0    kded/ui/vaultdeletionwidget.cpp     [License: GPL (v2/3)]
C  +18   -38   kded/ui/vaultdeletionwidget.h [from: kded/ui/namechooserwidget.cpp - 057% similarity]
A  +65   -0    kded/ui/vaultdeletionwidget.ui
M  +1    -1    plasma/vaultsmodel.cpp

https://commits.kde.org/plasma-vault/eadb8c0689fd6d8bf55a758471ce75cb9b982849
Comment 15 blueball 2019-06-12 09:57:59 UTC
For the Kubuntu 18.04.2 LTS users who got here due Google: 

Use Michael Tunnell's manual solution, since Kubuntu 18.04.2 is still stuck at 5.12 at the time of writing this comment.