mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-26 18:56:39 +00:00
Disable ?edit=1
for non-admin users (#17493)
This commit is contained in:
parent
4884108123
commit
accc8bc644
@ -564,7 +564,7 @@ class HUIRoot extends LitElement {
|
|||||||
super.firstUpdated(changedProps);
|
super.firstUpdated(changedProps);
|
||||||
// Check for requested edit mode
|
// Check for requested edit mode
|
||||||
const searchParams = extractSearchParamsObject();
|
const searchParams = extractSearchParamsObject();
|
||||||
if (searchParams.edit === "1") {
|
if (searchParams.edit === "1" && this.hass!.user?.is_admin) {
|
||||||
this.lovelace!.setEditMode(true);
|
this.lovelace!.setEditMode(true);
|
||||||
} else if (searchParams.conversation === "1") {
|
} else if (searchParams.conversation === "1") {
|
||||||
this._showVoiceCommandDialog();
|
this._showVoiceCommandDialog();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user