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; return;
} }
try { if (this.hass.user.is_admin) {
const info = await this.hass.callWS({ try {
type: "config/entity_registry/get", const info = await this.hass.callWS({
entity_id: newVal.entity_id, type: "config/entity_registry/get",
}); entity_id: newVal.entity_id,
this._registryInfo = info; });
} catch (err) { this._registryInfo = info;
this._registryInfo = null; } catch (err) {
this._registryInfo = null;
}
} }
} }