You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2016/04/23 11:47:39 UTC

incubator-zeppelin git commit: [ZEPPELIN-818]Permissions cannot be cleared

Repository: incubator-zeppelin
Updated Branches:
  refs/heads/master ca8563fbf -> 3c0a3b3fc


[ZEPPELIN-818]Permissions cannot be cleared

### What is this PR for?
To allow user to clear note permissions .

### What type of PR is it?
[BUG]

### Todos

### What is the Jira issue?
[ZEPPELIN-818](https://issues.apache.org/jira/browse/ZEPPELIN-818?jql=project%20%3D%20ZEPPELIN)

### How should this be tested?
You should be able to remove users from note permissions

### Screenshots (if appropriate)
NA

### Questions:
* Does the licenses files need update?NO
* Is there breaking changes for older versions?NO
* Does this needs documentation?NO

Author: Ravi Ranjan <ra...@gmail.com>

Closes #846 from ravicodder/DeletePermission and squashes the following commits:

f0b7e4e [Ravi Ranjan] Allow owner to take away privileges from users


Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/3c0a3b3f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/3c0a3b3f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/3c0a3b3f

Branch: refs/heads/master
Commit: 3c0a3b3fcf736e18fa73ba56c22a0b8f74042eb4
Parents: ca8563f
Author: Ravi Ranjan <ra...@gmail.com>
Authored: Mon Apr 11 18:04:23 2016 +0530
Committer: Lee moon soo <mo...@apache.org>
Committed: Sat Apr 23 18:47:38 2016 +0900

----------------------------------------------------------------------
 .../java/org/apache/zeppelin/notebook/NotebookAuthorization.java  | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/3c0a3b3f/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java
index b8a62b5..7efa46d 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/NotebookAuthorization.java
@@ -116,6 +116,7 @@ public class NotebookAuthorization {
       if (existingEntities == null) {
         noteAuthInfo.put("owners", new LinkedHashSet(entities));
       } else {
+        existingEntities.clear();
         existingEntities.addAll(entities);
       }
     }
@@ -135,6 +136,7 @@ public class NotebookAuthorization {
       if (existingEntities == null) {
         noteAuthInfo.put("readers", new LinkedHashSet(entities));
       } else {
+        existingEntities.clear();
         existingEntities.addAll(entities);
       }
     }
@@ -154,6 +156,7 @@ public class NotebookAuthorization {
       if (existingEntities == null) {
         noteAuthInfo.put("writers", new LinkedHashSet(entities));
       } else {
+        existingEntities.clear();
         existingEntities.addAll(entities);
       }
     }