You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ma...@apache.org on 2017/10/23 11:51:17 UTC
[06/16] james-project git commit: JAMES-2186 JMAP integration:
AclProbe: add addRights method
JAMES-2186 JMAP integration: AclProbe: add addRights method
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/3104280d
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/3104280d
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/3104280d
Branch: refs/heads/master
Commit: 3104280d40d95c6afff3dde75703a82adb96faaf
Parents: 33d68a7
Author: Luc DUZAN <ld...@linagora.com>
Authored: Mon Oct 16 14:55:14 2017 +0700
Committer: Matthieu Baechler <ma...@apache.org>
Committed: Mon Oct 23 13:50:38 2017 +0200
----------------------------------------------------------------------
.../java/org/apache/james/mailbox/store/probe/ACLProbe.java | 2 ++
.../src/main/java/org/apache/james/modules/ACLProbeImpl.java | 8 ++++++++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/3104280d/mailbox/store/src/main/java/org/apache/james/mailbox/store/probe/ACLProbe.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/probe/ACLProbe.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/probe/ACLProbe.java
index 1c5ba4d..600dd9b 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/probe/ACLProbe.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/probe/ACLProbe.java
@@ -27,5 +27,7 @@ import org.apache.james.mailbox.model.MailboxPath;
public interface ACLProbe {
void replaceRights(MailboxPath mailboxPath, String targetUser, Rfc4314Rights rights) throws MailboxException;
+ void addRights(MailboxPath mailboxPath, String targetUser, Rfc4314Rights rights) throws MailboxException;
+
MailboxACL retrieveRights(MailboxPath mailboxPath) throws MailboxException;
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/3104280d/server/container/guice/mailbox/src/main/java/org/apache/james/modules/ACLProbeImpl.java
----------------------------------------------------------------------
diff --git a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/ACLProbeImpl.java b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/ACLProbeImpl.java
index 801ebe7..61b8ddf 100644
--- a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/ACLProbeImpl.java
+++ b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/ACLProbeImpl.java
@@ -50,6 +50,14 @@ public class ACLProbeImpl implements GuiceProbe, ACLProbe {
}
@Override
+ public void addRights(MailboxPath mailboxPath, String targetUser, Rfc4314Rights rights) throws MailboxException {
+ MailboxSession mailboxSession = mailboxManager.createSystemSession(mailboxPath.getUser());
+ ACLCommand command = MailboxACL.command().forUser(targetUser).rights(rights).asAddition();
+
+ mailboxManager.applyRightsCommand(mailboxPath, command, mailboxSession);
+ }
+
+ @Override
public MailboxACL retrieveRights(MailboxPath mailboxPath) throws MailboxException {
MailboxSession mailboxSession = mailboxManager.createSystemSession(mailboxPath.getUser());
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org