zjffdu commented on a change in pull request #3314: [ZEPPELIN-4019] Interpreter process get note from server URL: https://github.com/apache/zeppelin/pull/3314#discussion_r262324196
########## File path: zeppelin-server/src/main/java/org/apache/zeppelin/socket/NotebookServer.java ########## @@ -1844,6 +1849,61 @@ public void onParaInfosReceived(String noteId, String paragraphId, } } + @Override + public List<ParagraphInfo> getParagraphList(String user, String noteId) + throws TException, ServiceException { + try { + AuthenticationInfo authInfo = new AuthenticationInfo(); + authInfo.setUser(user); + + Set<String> userAndRoles = new HashSet<>(); + userAndRoles.add(user); + + ServiceContext serviceContext = new ServiceContext(authInfo, userAndRoles); + Note note = getNotebookService().getNote(noteId, serviceContext, Review comment: NotebookService is usually for external call (such as websocket or rest api). Because only websocket & rest api needs callback. Here we can directly call notebook() to get Note and check permission. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services