diff --git a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js index ebcaf9a77e6..c3e03347b33 100644 --- a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js +++ b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js @@ -69,13 +69,16 @@ } else if (op === 'LIST_UPDATE_NOTE_JOBS') { $rootScope.$broadcast('setUpdateNoteJobs', data.noteRunningJobs); } else if (op === 'AUTH_INFO') { - BootstrapDialog.show({ - closable: false, - closeByBackdrop: false, - closeByKeyboard: false, - title: 'Insufficient privileges', - message: data.info.toString(), - buttons: [{ + var btn = []; + if ($rootScope.ticket.roles === '[]') { + btn = [{ + label: 'Close', + action: function(dialog) { + dialog.close(); + } + }]; + } else { + btn = [{ label: 'Login', action: function(dialog) { dialog.close(); @@ -89,8 +92,18 @@ dialog.close(); $location.path('/'); } - }] + }]; + } + + BootstrapDialog.show({ + closable: false, + closeByBackdrop: false, + closeByKeyboard: false, + title: 'Insufficient privileges', + message: data.info.toString(), + buttons: btn }); + } else if (op === 'PARAGRAPH') { $rootScope.$broadcast('updateParagraph', data); } else if (op === 'PARAGRAPH_APPEND_OUTPUT') {