From 88c95bb1614e049f342e0dee5464255bbce4e547 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sun, 29 Jan 2017 23:06:26 -0500 Subject: [PATCH] Add support for bitwarden password manager --- app/extensions.js | 6 ++++++ .../brave/locales/en-US/preferences.properties | 1 + docs/state.md | 1 + js/about/preferences.js | 1 + js/constants/appConfig.js | 1 + js/constants/passwordManagers.js | 3 +++ js/constants/settings.js | 1 + js/settings.js | 3 +++ test/about/extensionsTest.js | 14 ++++++++++++++ test/unit/settingsTest.js | 14 +++++++++++++- 10 files changed, 44 insertions(+), 1 deletion(-) diff --git a/app/extensions.js b/app/extensions.js index 2e3aecebf81..4837ccb2d68 100644 --- a/app/extensions.js +++ b/app/extensions.js @@ -449,6 +449,12 @@ module.exports.init = () => { disableExtension(extensionIds[passwordManagers.ENPASS]) } + if (activePasswordManager === passwordManagers.BITWARDEN) { + registerComponent(extensionIds[passwordManagers.BITWARDEN]) + } else { + disableExtension(extensionIds[passwordManagers.BITWARDEN]) + } + if (getSetting(settings.POCKET_ENABLED)) { registerComponent(config.PocketExtensionId) } else { diff --git a/app/extensions/brave/locales/en-US/preferences.properties b/app/extensions/brave/locales/en-US/preferences.properties index 8db3d8a1379..dd4129a454c 100644 --- a/app/extensions/brave/locales/en-US/preferences.properties +++ b/app/extensions/brave/locales/en-US/preferences.properties @@ -222,6 +222,7 @@ onePassword=1Password® (requires application) dashlane=Dashlane® (requires application) lastPass=LastPass® enpass=Enpass® (requires application) +bitwarden=bitwarden® doNotManageMyPasswords=Don't manage my passwords usePDFJS=Enable HTML5 PDF reader (requires browser restart) enableFlash=Enable Adobe Flash support diff --git a/docs/state.md b/docs/state.md index bbe6b2c356c..0ea5717fe29 100644 --- a/docs/state.md +++ b/docs/state.md @@ -196,6 +196,7 @@ AppStore 'search.offer-search-suggestions': boolean, // true if suggestions should be offered from the default search engine when available. 'security.flash.installed': boolean, 'security.passwords.active-password-manager': string, // name of active password manager + 'security.passwords.bitwarden-enabled': boolean, // true if the bitwarden extension should be enabled 'security.passwords.dashlane-enabled': boolean, // true if the Dashlane extension should be enabled 'security.passwords.enpass-enabled': boolean, // true if the Enpass extension should be enabled 'security.passwords.last-pass-enabled': boolean, // true if the Last password extension should be enabled diff --git a/js/about/preferences.js b/js/about/preferences.js index 9e83929a988..501122336ea 100644 --- a/js/about/preferences.js +++ b/js/about/preferences.js @@ -1023,6 +1023,7 @@ class SecurityTab extends ImmutableComponent {