You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by pr...@apache.org on 2017/04/30 02:42:54 UTC

zeppelin git commit: [minor] Improve Session

Repository: zeppelin
Updated Branches:
  refs/heads/master 2c504c44d -> 129741c2f


[minor] Improve Session

### What is this PR for?
A minor tweak for handling session.

### What type of PR is it?
[Improvement]

### Questions:
* Does the licenses files need update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? N/A

Author: Prabhjyot Singh <pr...@gmail.com>

Closes #2302 from prabhjyotsingh/ImproveSession and squashes the following commits:

b9f9f0c9b [Prabhjyot Singh] improve session


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/129741c2
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/129741c2
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/129741c2

Branch: refs/heads/master
Commit: 129741c2f668a123f3d5b8db5da4b4f600a61e93
Parents: 2c504c4
Author: Prabhjyot Singh <pr...@gmail.com>
Authored: Sat Apr 29 23:21:38 2017 +0530
Committer: Prabhjyot Singh <pr...@gmail.com>
Committed: Sun Apr 30 08:12:49 2017 +0530

----------------------------------------------------------------------
 .../src/main/java/org/apache/zeppelin/rest/LoginRestApi.java      | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/129741c2/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
index 94e4c25..c9b24b1 100644
--- a/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
+++ b/zeppelin-server/src/main/java/org/apache/zeppelin/rest/LoginRestApi.java
@@ -75,6 +75,9 @@ public class LoginRestApi {
         UsernamePasswordToken token = new UsernamePasswordToken(userName, password);
         //      token.setRememberMe(true);
         currentUser.login(token);
+        currentUser.getSession().stop();
+        currentUser.getSession(true);
+
         HashSet<String> roles = SecurityUtils.getRoles();
         String principal = SecurityUtils.getPrincipal();
         String ticket;