mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Ensure that the authentication instance is created only when the input
prinicipal is not null.
This commit is contained in:
parent
7642f633dd
commit
5a45c9e09d
1 changed files with 4 additions and 1 deletions
|
|
@ -719,7 +719,10 @@ public class NotebookServer extends WebSocketServlet implements
|
|||
if (fromMessage != null) {
|
||||
String noteName = (String) ((Map) fromMessage.get("notebook")).get("name");
|
||||
String noteJson = gson.toJson(fromMessage.get("notebook"));
|
||||
AuthenticationInfo subject = new AuthenticationInfo(fromMessage.principal);
|
||||
AuthenticationInfo subject = null;
|
||||
if (fromMessage.principal != null) {
|
||||
subject = new AuthenticationInfo(fromMessage.principal);
|
||||
}
|
||||
note = notebook.importNote(noteJson, noteName, subject);
|
||||
note.persist(subject);
|
||||
broadcastNote(note);
|
||||
|
|
|
|||
Loading…
Reference in a new issue