Commit 580ef344 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

IMAP: allow creating top-level folders it User namespace is empty

If the server does not support namespaces or if the user namespace is empty
then allow creating sub-collections directly under the top-level collection.

BUG: 339567
FIXED-IN: 5.5.2
parent 49586b63
......@@ -56,6 +56,13 @@ void RetrieveCollectionsTask::doStart(KIMAP::Session *session)
policy.setInheritFromParent(false);
policy.setSyncOnDemand(true);
// The first in the list of namespaces is User namespace
// If the user namespace is empty, then make it possible for user to create
// new folders as children of the root folder
if (serverNamespaces().value(0).name.isEmpty()) {
root.setRights(Akonadi::Collection::CanCreateCollection);
}
QStringList localParts;
localParts << QLatin1String(Akonadi::MessagePart::Envelope)
<< QLatin1String(Akonadi::MessagePart::Header);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment