@Override public Rfc4314Rights myRights(MailboxPath mailboxPath, MailboxSession session) throws MailboxException { return storeRightManager.myRights(mailboxPath, session); }
@Override public Rfc4314Rights myRights(MailboxId mailboxId, MailboxSession session) throws MailboxException { return storeRightManager.myRights(mailboxId, session); }
public boolean hasRight(Mailbox mailbox, Right right, MailboxSession session) throws MailboxException { return myRights(mailbox, session).contains(right); }
@Override public boolean hasRight(MailboxPath mailboxPath, Right right, MailboxSession session) throws MailboxException { return myRights(mailboxPath, session).contains(right); }
@Override public boolean hasRight(MailboxId mailboxId, Right right, MailboxSession session) throws MailboxException { return myRights(mailboxId, session).contains(right); }
@Override public Rfc4314Rights myRights(MailboxPath mailboxPath, MailboxSession session) throws MailboxException { MailboxMapper mapper = mailboxSessionMapperFactory.getMailboxMapper(session); Mailbox mailbox = mapper.findMailboxByPath(mailboxPath); return myRights(mailbox, session); }
@Override public Rfc4314Rights myRights(MailboxId mailboxId, MailboxSession session) throws MailboxException { MailboxMapper mapper = mailboxSessionMapperFactory.getMailboxMapper(session); Mailbox mailbox = mapper.findMailboxById(mailboxId); return myRights(mailbox, session); }
public boolean isReadWrite(MailboxSession session, Mailbox mailbox, Flags sharedPermanentFlags) throws UnsupportedRightException { Rfc4314Rights rights = myRights(mailbox, session); /* * then go through shared flags. RFC 4314 section 4: * Changing flags: STORE * - the server MUST check if the user has "t" (expunge) right * - when the user modifies \Deleted flag "s" (seen) right * - when the user modifies \Seen flag "w" (write) - for all other message flags. */ return rights.contains(Right.Insert) || rights.contains(Right.PerformExpunge) || checkDeleteFlag(rights, sharedPermanentFlags) || checkSeenFlag(rights, sharedPermanentFlags) || checkWriteFlag(rights, sharedPermanentFlags); }