Encrypt drafts by default
ClosedPublic

Authored by dvratil on Aug 7 2017, 2:47 PM.

Details

Summary

This change toggles the default behavior of composer and will always store drafts encrypted - but only if user has enabled encryption in the composer. If the "Encrypt" action is not enabled, the draft will not be stored encrypted.

This change also renames the option NeverEncryptDrafts to AlwaysEncryptDrafts to avoid the "double negative" when doing !cfg->neverEncryptDrafts. It's also a neat hack to get the same defaults for all users :-)

Diff Detail

Repository
R206 KMail
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dvratil created this revision.Aug 7 2017, 2:47 PM
Restricted Application added a subscriber: KDE PIM. · View Herald TranscriptAug 7 2017, 2:47 PM
aheinecke accepted this revision.Aug 7 2017, 3:02 PM

From my side thumbs up. I checked what Microsoft does in their S/MIME Outlook implementation and they Encrypt / Sign drafts by default (if encryption is selected). I think (but I'm not sure) Enigmail / Thunderbird does this, too.

This revision is now accepted and ready to land.Aug 7 2017, 3:02 PM
mlaurent requested changes to this revision.Aug 7 2017, 4:02 PM
mlaurent added inline comments.
src/settings/kmail.kcfg.cmake
177

How do you manage to migrate settings ?
You changes key value => settings is lost no ?

This revision now requires changes to proceed.Aug 7 2017, 4:02 PM
dvratil added inline comments.Aug 7 2017, 4:08 PM
src/settings/kmail.kcfg.cmake
177

This is the smart neat hack I mentioned :-) People who disabled "Never encrypt drafts" (i.e. people who enabled encryption) will have it still enabled with the new option, because "Always encrypt drafts" is enabled by default. People who had "Never encrypt drafts" enabled - the default value - will now get the new feature of encrypting drafts enabled by default - and that's the main point of this change - to enable to encrypt drafts by default.

Most people did not know we had this feature anyway because it was off by default so we will now turn it on for them and if they will not like it, they can turn it off again in the settings.

mlaurent accepted this revision.Aug 8 2017, 4:35 AM
mlaurent added inline comments.
src/settings/kmail.kcfg.cmake
177

Ok I understand.
Indeed it's not easy to migrate this settings.

This revision is now accepted and ready to land.Aug 8 2017, 4:35 AM
This revision was automatically updated to reflect the committed changes.