Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAMES-2182 Sharing for IMAP #2445

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open

Conversation

chibenwa
Copy link
Contributor

@chibenwa chibenwa commented Oct 9, 2024

My second shot ever at this.

First a BIG refactoring centralizes the definition of path <-> name convertion into the IMAP layer (pre-requisite) and
provide a generic strategy that could be allowed to be overloaded (PathConverter + Namespace supplier).

A second part of this work is about exposing other users folder shared with the user into a #user folder.

Remaining work:

  • Polishing the few TODOs
  • More test with sharee interacting with delgated mailboxes in IMAP
  • Test it with real life IMAP client to ensure this works as intended.

I am happy, in 1 day coding it got quite far, though details needs to be addressed and more tests needs to be produced.

@chibenwa chibenwa self-assigned this Oct 9, 2024
@chibenwa
Copy link
Contributor Author

chibenwa commented Oct 9, 2024

Edit: evening coding session, most spotted bugs and a few others are out of the way but extensive testing will be required.

@chibenwa
Copy link
Contributor Author

chibenwa commented Oct 10, 2024

image

image

@chibenwa chibenwa force-pushed the imap-sharing branch 3 times, most recently from b21f6de to a3fcbd9 Compare October 11, 2024 09:14
@chibenwa chibenwa force-pushed the imap-sharing branch 2 times, most recently from 1baac9e to ba95f71 Compare October 20, 2024 16:39
We do not need those IMAP concerns onto the storage layer.
We will later come up with alternative implementation for
namespace customization.
Guice implementors can then very easily overwrite the namespace definition
This will allow customization of the IMAP folder naming strategy.
…-> mailboxname

 - Centralize in one place the knowledge of encoding MailboxPath
 into IMAP
As we can only access resources within a single domain the
domain is implicit and thus do not need to be repeated in the
IMAP wording.
This common character conflicts with the path delimiter
of the mailbox name and thus needs to be escaped.
Several issues remains to address:
 - [ ] List + myrights needs to keep FQDN in the response
 - [ ] #user shall not include personal mailboxes
       filter them out?
       (post filtering?)
 - [ ] Using #user in mailbox name pattern shall be permitted
 - [ ] Remove duplicate results...
@chibenwa chibenwa marked this pull request as ready for review October 22, 2024 08:00
Copy link
Contributor

@Arsnael Arsnael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quite a big one to read, but interesting. Huge work here, cool!

Just a minor remark but overall LGTM

if (!isWriteable(mailboxSession)) {
throw new ReadOnlyException(getMailboxPath());
if (flagsUpdateMode.equals(FlagsUpdateMode.REPLACE)) {
if (!myRights.contains(MailboxACL.Right.Write, MailboxACL.Right.WriteSeenFlag, MailboxACL.Right.DeleteMessages)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe containsAll? I had to go into the contain method to verify that all input rights have to be contained.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's rather explicit, and it is unrelated with this change set.

Maybe others have opinions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants