[ZEPPELIN-3092] Remove loading notebook from repository when requested

This commit is contained in:
Mohamed Magdy 2017-12-19 16:23:40 +01:00
parent af952a0728
commit db94d55d94
2 changed files with 1 additions and 12 deletions

View file

@ -823,7 +823,7 @@ public class NotebookServer extends WebSocketServlet
String user = fromMessage.principal;
Note note = notebook.getNoteAfterReloadFromRepo(noteId);
Note note = notebook.getNote(noteId);
if (note != null) {
if (!hasParagraphReaderPermission(conn, notebook, noteId,

View file

@ -296,17 +296,6 @@ public class Notebook implements NoteEventListener {
}
}
public Note getNoteAfterReloadFromRepo(String noteId) {
synchronized (notes) {
// Each time the notebook is requested, it is loaded from the storage repository. This helps
// in fetching the latest versions of the notebook if a remote repository is used.
// For example, if GitHub is integrated, whenever the notebook is requested, it is pulled from
// the remote repository.
loadNoteFromRepo(noteId, AuthenticationInfo.ANONYMOUS);
return notes.get(noteId);
}
}
public Folder getFolder(String folderId) {
synchronized (folders) {
return folders.getFolder(folderId);