From be7fb50f8c51988a8aac47d1aa8808844ec087a0 Mon Sep 17 00:00:00 2001 From: Jerad Meisner Date: Thu, 26 Jul 2018 23:27:59 -0700 Subject: [PATCH] Hide change password card for non-homeassistant auth_providers. (#1526) --- src/panels/profile/ha-panel-profile.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/panels/profile/ha-panel-profile.js b/src/panels/profile/ha-panel-profile.js index 85101e4e48..1dbd8d0d39 100644 --- a/src/panels/profile/ha-panel-profile.js +++ b/src/panels/profile/ha-panel-profile.js @@ -53,7 +53,9 @@ class HaPanelProfile extends EventsMixin(PolymerElement) { >Log out - + `; @@ -70,6 +72,10 @@ class HaPanelProfile extends EventsMixin(PolymerElement) { _handleLogOut() { this.fire('hass-logout'); } + + _canChangePassword(user) { + return user.credentials.some(cred => cred.auth_provider_type === 'homeassistant'); + } } customElements.define('ha-panel-profile', HaPanelProfile);