mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
set permissions on note create and import
This commit is contained in:
parent
44297a40fd
commit
28abffac6a
1 changed files with 2 additions and 5 deletions
|
|
@ -166,11 +166,7 @@ public class Notebook implements NoteEventListener {
|
|||
bindInterpretersToNote(subject.getUser(), note.getId(), interpreterIds);
|
||||
}
|
||||
|
||||
if (subject != null && !"anonymous".equals(subject.getUser())) {
|
||||
Set<String> owners = new HashSet<>();
|
||||
owners.add(subject.getUser());
|
||||
notebookAuthorization.setOwners(note.getId(), owners);
|
||||
}
|
||||
notebookAuthorization.setNewNotePermissions(note.getId(), subject);
|
||||
noteSearchService.addIndexDoc(note);
|
||||
note.persist(subject);
|
||||
fireNoteCreateEvent(note);
|
||||
|
|
@ -225,6 +221,7 @@ public class Notebook implements NoteEventListener {
|
|||
newNote.addCloneParagraph(p);
|
||||
}
|
||||
|
||||
notebookAuthorization.setNewNotePermissions(newNote.getId(), subject);
|
||||
newNote.persist(subject);
|
||||
} catch (IOException e) {
|
||||
logger.error(e.toString(), e);
|
||||
|
|
|
|||
Loading…
Reference in a new issue