KIMAP::Acl Namespace

Operations for dealing with mailbox permissions. More...

Header: #include <KIMAP/Acl>
CMake: find_package(KPim6IMAP REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::IMAP)

Types

enum Right { None, Lookup, Read, KeepSeen, Write, …, Custom9 }
flags Rights

Functions

KIMAP::Acl::Rights denormalizedRights(KIMAP::Acl::Rights rights)
KIMAP::Acl::Rights normalizedRights(KIMAP::Acl::Rights rights)
KIMAP::Acl::Rights rightsFromString(QByteArrayView string)
QByteArray rightsToString(KIMAP::Acl::Rights rights)

Detailed Description

Type Documentation

enum Acl::Right
flags Acl::Rights

Possible rights that can be held on a mailbox

ConstantValueDescription
KIMAP::Acl::None0x000000 
KIMAP::Acl::Lookup0x000001Mailbox is visible to LIST/LSUB commands, SUBSCRIBE mailbox
KIMAP::Acl::Read0x000002SELECT the mailbox, perform STATUS
KIMAP::Acl::KeepSeen0x000004Set or clear the Seen flag on messages in the mailbox, and keep it across sessions
KIMAP::Acl::Write0x000008Set or clear flags other than Seen and Deleted on messages in the mailbox
KIMAP::Acl::Insert0x000010Perform APPEND and COPY with the mailbox as the target
KIMAP::Acl::Post0x000020Send mail to the submission address for the mailbox. Note this is not enforced by IMAP4, but is purely advisory.
KIMAP::Acl::Create0x000040Obsolete as of RFC 4314, replaced by CreateMailbox and DeleteMailbox
KIMAP::Acl::CreateMailbox0x000080Create new child mailboxes, or move a mailbox with this mailbox as the new parent. Note that what constitutes a "child" mailbox is implementation-defined, but . or / are usually used as separaters.
KIMAP::Acl::DeleteMailbox0x000100Delete or move the mailbox
KIMAP::Acl::DeleteMessage0x000200Set or clear the Deleted flag on messages in the mailbox
KIMAP::Acl::Delete0x000400Obsolete as of RFC 4314, replaced by DeleteMessage and Expunge
KIMAP::Acl::Admin0x000800View and modify the access control list for the mailbox
KIMAP::Acl::Expunge0x001000Expunge the messages in this mailbox. Note that if this right is not held on a mailbox, closing the mailbox (see CloseJob) will succeed, but will not expunge the messages.
KIMAP::Acl::WriteShared0x002000Write shared annotations. See RFC 5257. Only supported by servers that implement the ANNOTATE extension.
KIMAP::Acl::Custom00x004000Server-specific right 0
KIMAP::Acl::Custom10x008000Server-specific right 1
KIMAP::Acl::Custom20x010000Server-specific right 2
KIMAP::Acl::Custom30x020000Server-specific right 3
KIMAP::Acl::Custom40x040000Server-specific right 4
KIMAP::Acl::Custom50x080000Server-specific right 5
KIMAP::Acl::Custom60x100000Server-specific right 6
KIMAP::Acl::Custom70x200000Server-specific right 7
KIMAP::Acl::Custom80x400000Server-specific right 8
KIMAP::Acl::Custom90x800000Server-specific right 9

The Rights type is a typedef for QFlags<Right>. It stores an OR combination of Right values.

Function Documentation

KIMAP::Acl::Rights Acl::denormalizedRights(KIMAP::Acl::Rights rights)

Returns a rights mask that contains both obsolete and new flags if one of them is set.

rights set of Rights flags to augment

KIMAP::Acl::Rights Acl::normalizedRights(KIMAP::Acl::Rights rights)

Returns a rights mask that has no obsolete members anymore, i.e. obsolete flags are removed and replaced by their successors.

rights set of Rights flags to normalize

KIMAP::Acl::Rights Acl::rightsFromString(QByteArrayView string)

Convert the text form of a set of rights into a Rights bitflag

Modifier flags ('+' and '-') are ignored, as are any unknown characters. This method will not complain if you give it something that is not a list of rights.

QByteArray Acl::rightsToString(KIMAP::Acl::Rights rights)

Convert a set of rights into text format

No modifier flag ('+' or '-') will be included.