|
|
|
@ -2,7 +2,7 @@ import { css } from '@emotion/css'; |
|
|
|
|
import React, { PureComponent } from 'react'; |
|
|
|
|
import { Unsubscribable } from 'rxjs'; |
|
|
|
|
|
|
|
|
|
import { GrafanaTheme2 } from '@grafana/data'; |
|
|
|
|
import { GrafanaTheme2, OrgRole } from '@grafana/data'; |
|
|
|
|
import { config, getGrafanaLiveSrv } from '@grafana/runtime'; |
|
|
|
|
import { Alert, stylesFactory } from '@grafana/ui'; |
|
|
|
|
import { contextSrv } from 'app/core/services/context_srv'; |
|
|
|
@ -46,7 +46,7 @@ export class LiveConnectionWarning extends PureComponent<Props, State> { |
|
|
|
|
render() { |
|
|
|
|
const { show } = this.state; |
|
|
|
|
if (show) { |
|
|
|
|
if (!contextSrv.isSignedIn || !config.liveEnabled || contextSrv.user.orgRole === '') { |
|
|
|
|
if (!contextSrv.isSignedIn || !config.liveEnabled || contextSrv.user.orgRole === OrgRole.None) { |
|
|
|
|
return null; // do not show the warning for anonymous users or ones with no org (and /login page etc)
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|