From 12f5d16c76c1a9ec2d049bc37bec75e8eb96cc31 Mon Sep 17 00:00:00 2001 From: Eric Leijonmarck Date: Wed, 31 Jul 2019 15:52:46 +0200 Subject: [PATCH] Keyboard Shortcuts: Sign in to enable them (#18271) --- public/app/core/services/keybindingSrv.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/public/app/core/services/keybindingSrv.ts b/public/app/core/services/keybindingSrv.ts index 66841f8372a..37b5ba15f25 100644 --- a/public/app/core/services/keybindingSrv.ts +++ b/public/app/core/services/keybindingSrv.ts @@ -39,13 +39,15 @@ export class KeybindingSrv { } setupGlobal() { - this.bind(['?', 'h'], this.showHelpModal); - this.bind('g h', this.goToHome); - this.bind('g a', this.openAlerting); - this.bind('g p', this.goToProfile); - this.bind('s o', this.openSearch); - this.bind('f', this.openSearch); - this.bindGlobal('esc', this.exit); + if (this.contextSrv.user.isSignedIn) { + this.bind(['?', 'h'], this.showHelpModal); + this.bind('g h', this.goToHome); + this.bind('g a', this.openAlerting); + this.bind('g p', this.goToProfile); + this.bind('s o', this.openSearch); + this.bind('f', this.openSearch); + this.bindGlobal('esc', this.exit); + } } openSearch() {