Live: No connection warning for user with no org (#37943)

This commit is contained in:
Atif Shoukat Ali 2021-08-16 22:11:39 -07:00 committed by GitHub
parent 5d74c47cf8
commit f6c9c196ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,8 +45,8 @@ export class LiveConnectionWarning extends PureComponent<Props, State> {
render() { render() {
const { show } = this.state; const { show } = this.state;
if (show) { if (show) {
if (!contextSrv.isSignedIn || !config.liveEnabled) { if (!contextSrv.isSignedIn || !config.liveEnabled || contextSrv.user.orgRole === '') {
return null; // do not show the warning for anonymous users (and /login page etc) return null; // do not show the warning for anonymous users or ones with no org (and /login page etc)
} }
return ( return (