Repository: zeppelin Updated Branches: refs/heads/master e6b32c0f2 -> 616301ae4
[ZEPPELIN-2172] Redirect to home if notebook authentication fails in realtime ### What is this PR for? Redirect to home page, if a user declines the access failure message on a notebook ### What type of PR is it? [Bug Fix] ### What is the Jira issue? * [ZEPPELIN-2172](https://issues.apache.org/jira/browse/ZEPPELIN-2172) ### How should this be tested? 1. Create a notebook with qa_user user as the owner 2. Give write permissions to user test_user1, and read permissions to user test_user3 3. Now in another tab, open the notebook with test_user1 user who has write permissions 4. In the original tab, have user qa_user (owner of the notebook) remove the write permissions from test_user1 user and grant it to some other user test_user5. 5. Goto the other tab where user test_user1 was logged in. It shows an error message 6. On click of close button, UI should redirect to homepage ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Author: ess_ess <sravans2...@gmail.com> Closes #2087 from sravan-s/ZEPPELIN-2172 and squashes the following commits: 0b9b1dd [ess_ess] Add explanatory comment b73cc73 [ess_ess] [ZEPPELIN-2172] Redirect to home if auth fails Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/616301ae Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/616301ae Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/616301ae Branch: refs/heads/master Commit: 616301ae4762264a33623b3005a4397db23b215b Parents: e6b32c0 Author: ess_ess <sravans2...@gmail.com> Authored: Sun Mar 5 16:17:39 2017 +0530 Committer: Lee moon soo <m...@apache.org> Committed: Tue Mar 7 15:28:58 2017 +0900 ---------------------------------------------------------------------- .../src/components/websocketEvents/websocketEvents.factory.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/616301ae/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js index bcc0fd3..75e1b2e 100644 --- a/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js +++ b/zeppelin-web/src/components/websocketEvents/websocketEvents.factory.js @@ -89,7 +89,11 @@ function websocketEvents($rootScope, $websocket, $location, baseUrlSrv) { label: 'Cancel', action: function(dialog) { dialog.close(); - $location.path('/'); + // using $rootScope.apply to trigger angular digest cycle + // changing $location.path inside bootstrap modal wont trigger digest + $rootScope.$apply(function() { + $location.path('/'); + }); } }]; }