mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
Only attempt to get "trace/contexts" if admin (#9378)
* Only attempt to get "trace/contexts" if admin * Changes from review
This commit is contained in:
parent
0e3eed0563
commit
6e50d1166a
@ -127,7 +127,7 @@ export class MoreInfoLogbook extends LitElement {
|
||||
this.entityId,
|
||||
true
|
||||
),
|
||||
loadTraceContexts(this.hass),
|
||||
this.hass.user?.is_admin ? loadTraceContexts(this.hass) : {},
|
||||
this._fetchUserPromise,
|
||||
]);
|
||||
this._logbookEntries = this._logbookEntries
|
||||
|
@ -257,7 +257,9 @@ export class HaPanelLogbook extends LitElement {
|
||||
this._endDate.toISOString(),
|
||||
this._entityId
|
||||
),
|
||||
isComponentLoaded(this.hass, "trace") ? loadTraceContexts(this.hass) : {},
|
||||
isComponentLoaded(this.hass, "trace") && this.hass.user?.is_admin
|
||||
? loadTraceContexts(this.hass)
|
||||
: {},
|
||||
this._fetchUserPromise,
|
||||
]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user