JAMES-2247 Don't log owner ACL entry as unexpected

Each mailbox acl contains a special `owner` entry.

Thus, having that special entry is expected.

As JMAP layer right resolution don't support `special` right entry, these 
special entries are logged as unexpected. What they are not.

It leads to overkill logging.

We should keep filtering out special `owner` entry, but should not log it.


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/49064682
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/49064682
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/49064682

Branch: refs/heads/master
Commit: 4906468207fdcf1b018dece072704bdf4031a8f7
Parents: 4135794
Author: benwa <[email protected]>
Authored: Fri Dec 1 15:24:52 2017 +0700
Committer: benwa <[email protected]>
Committed: Fri Dec 1 15:24:52 2017 +0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/james/jmap/model/mailbox/Rights.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/49064682/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/mailbox/Rights.java
----------------------------------------------------------------------
diff --git 
a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/mailbox/Rights.java
 
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/mailbox/Rights.java
index 43ba2bd..d909f29 100644
--- 
a/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/mailbox/Rights.java
+++ 
b/server/protocols/jmap/src/main/java/org/apache/james/jmap/model/mailbox/Rights.java
@@ -189,6 +189,9 @@ public class Rights {
             LOGGER.info("Negative keys are not supported");
             return false;
         }
+        if (key.equals(MailboxACL.OWNER_KEY)) {
+            return false;
+        }
         if (key.getNameType() != MailboxACL.NameType.user) {
             LOGGER.info(key.getNameType() + " is not supported. Only 'user' 
is.");
             return false;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to