check if noteId exists in session or take it from fromMessage

This commit is contained in:
Prabhjyot Singh 2017-08-03 07:34:24 -07:00
parent 8b8c2f9741
commit 947be70b41

View file

@ -1185,7 +1185,10 @@ public class NotebookServer extends WebSocketServlet
Map<String, Object> params = (Map<String, Object>) fromMessage.get("params");
Map<String, Object> config = (Map<String, Object>) fromMessage.get("config");
String noteId = (String) fromMessage.get("noteId");
String noteId = getOpenNoteId(conn);
if (noteId == null) {
noteId = (String) fromMessage.get("noteId");
}
if (!hasParagraphWriterPermission(conn, notebook, noteId,
userAndRoles, fromMessage.principal, "write")) {