From 9eae637814e5d8804b7cd4270d415a07da0dd5c3 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Tue, 10 Sep 2019 00:13:45 -0500 Subject: [PATCH] Only allow admin to edit UI config (#3674) Closes https://github.com/home-assistant/home-assistant-polymer/issues/3084 --- src/panels/lovelace/hui-root.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/panels/lovelace/hui-root.ts b/src/panels/lovelace/hui-root.ts index 57eebf1473..0427199331 100644 --- a/src/panels/lovelace/hui-root.ts +++ b/src/panels/lovelace/hui-root.ts @@ -186,16 +186,20 @@ class HUIRoot extends LitElement { ` : ""} - - ${this.hass!.localize( - "ui.panel.lovelace.menu.configure_ui" - )} - + ${this.hass!.user!.is_admin + ? html` + + ${this.hass!.localize( + "ui.panel.lovelace.menu.configure_ui" + )} + + ` + : ""}