mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Fix typo and bad copy paste for isOwner
This commit is contained in:
parent
c8c42b26a0
commit
eacfa8eee2
1 changed files with 2 additions and 2 deletions
|
|
@ -123,7 +123,7 @@ public class NotebookRestApi {
|
|||
Set<String> userAndRoles = Sets.newHashSet();
|
||||
userAndRoles.add(SecurityUtils.getPrincipal());
|
||||
userAndRoles.addAll(SecurityUtils.getRoles());
|
||||
if (!notebookAuthorization.hasReadAuthorization(userAndRoles, noteId)) {
|
||||
if (!notebookAuthorization.isOwner(userAndRoles, noteId)) {
|
||||
throw new UnauthorizedException(errorMsg);
|
||||
}
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ public class NotebookRestApi {
|
|||
HashSet<String> readers = permMap.get("readers");
|
||||
HashSet<String> owners = permMap.get("owners");
|
||||
HashSet<String> writers = permMap.get("writers");
|
||||
// Set readers, if writers and owners if empty -> set to user requesting the change
|
||||
// Set readers, if writers and owners is empty -> set to user requesting the change
|
||||
if (readers != null && !readers.isEmpty()) {
|
||||
if (writers.isEmpty()) {
|
||||
writers = Sets.newHashSet(SecurityUtils.getPrincipal());
|
||||
|
|
|
|||
Loading…
Reference in a new issue