Hide entity config option for user group (#2941)

This commit is contained in:
Paulus Schoutsen 2019-03-15 22:43:27 -07:00 committed by GitHub
parent 7aa296e774
commit 68909c80ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,14 +176,16 @@ class HaMoreInfoDialog extends DialogMixin(PolymerElement) {
return;
}
try {
const info = await this.hass.callWS({
type: "config/entity_registry/get",
entity_id: newVal.entity_id,
});
this._registryInfo = info;
} catch (err) {
this._registryInfo = null;
if (this.hass.user.is_admin) {
try {
const info = await this.hass.callWS({
type: "config/entity_registry/get",
entity_id: newVal.entity_id,
});
this._registryInfo = info;
} catch (err) {
this._registryInfo = null;
}
}
}