From 3ebb30bd4819df4e5a7dd9be8d6fb7b5b6bc4949 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Tue, 16 Jul 2019 20:43:00 -0700 Subject: [PATCH] Only show advanced mode toggle for admins. Fixes #3369 --- src/panels/profile/ha-panel-profile.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/panels/profile/ha-panel-profile.js b/src/panels/profile/ha-panel-profile.js index 1cefa17524..47577bc73c 100644 --- a/src/panels/profile/ha-panel-profile.js +++ b/src/panels/profile/ha-panel-profile.js @@ -104,10 +104,12 @@ class HaPanelProfile extends EventsMixin(LocalizeMixin(PolymerElement)) { mfa-modules="[[hass.user.mfa_modules]]" > - + cred.auth_provider_type === "homeassistant" ); } + + _isAdmin(user) { + return user.is_admin; + } } customElements.define("ha-panel-profile", HaPanelProfile);