Improve locked vault mountpoint UX
Currently, locked / unmounted vault mountpoints show up as ordinary empty folders, which can mislead users into accidentally using the vault while in a locked state / is very non-intuitive without knowledge of how Linux mountpoints operate. This patch series addresses this by giving locked vaults their own icon, while also restricting the permissions of the mountpoint directory while locked to prevent accidental usage / tampering.
Drive-by: also fixes some other minor UX issues I stumbled upon while working on this series.
Some questions that warrant discussion before this may be merged:
-
Is this something upstream KDE is interested in?
I have developed this series mainly based on my own usage of plasma-vault; as such it isn't clear whether these improvements align with the direction that upstream wants to go in. This PR is marked as a draft for this exact reason, since I am aware that it might need a few rounds of revisions before it matches the maintainers' vision of the project.
-
Should mountpoint locking be performed for old mountpoints / vaults as well?
Currently, the mountpoint locking feature (which removes all permissions from the mountpoint directory when not in use) is only active on freshly created vaults; this is to prevent it from accidentally interfering with an existing workflow / use case. However, it could be easily changed to work on existing plasma-vault mountpoints as well, if so desired by the maintainers.
-
What permissions should the locked mountpoint directory retain?
As of now, a locked mountpoint has
--x------permissions; this allows Dolphin to access the icon-carrying.directoryfile, but results inEPERMerrors for all other types of directory access. Another option would be to setr-x------permissions instead, which would result in the mountpoint presenting itself to the user as an empty folder without any explicit errors.