4 commits - pykolab/auth pykolab/cli pykolab/imap pykolab/Makefile.am
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Mon Aug 4 21:46:33 CEST 2014
pykolab/Makefile.am | 4 ++++
pykolab/auth/ldap/__init__.py | 17 +++++++++++++++++
pykolab/cli/cmd_rename_mailbox.py | 2 +-
pykolab/imap/cyrus.py | 9 +++++++--
4 files changed, 29 insertions(+), 3 deletions(-)
New commits:
commit 84fd219265a9c589d5031e9476677c0a3f59bab4
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Mon Aug 4 21:41:09 2014 +0200
Rename folders correctly
diff --git a/pykolab/imap/cyrus.py b/pykolab/imap/cyrus.py
index f09e429..6f561ce 100644
--- a/pykolab/imap/cyrus.py
+++ b/pykolab/imap/cyrus.py
@@ -123,6 +123,7 @@ class Cyrus(cyruslib.CYRUS):
imap = IMAP()
imap.connect(uri=uri)
+
if not self.SEP == self.separator:
self.separator = self.SEP
@@ -236,8 +237,12 @@ class Cyrus(cyruslib.CYRUS):
server = self.find_mailfolder_server(from_mailfolder)
self.connect(self.uri.replace(self.server,server))
- log.debug(_("Moving INBOX folder %s to %s") % (from_mailfolder,to_mailfolder), level=8)
- self.m.rename(from_mailfolder, to_mailfolder, partition)
+ if not partition == None:
+ log.debug(_("Moving INBOX folder %s to %s on partition %s") % (from_mailfolder,to_mailfolder, partition), level=8)
+ else:
+ log.debug(_("Moving INBOX folder %s to %s") % (from_mailfolder,to_mailfolder), level=8)
+
+ self.m.rename(self.folder_utf7(from_mailfolder), self.folder_utf7(to_mailfolder), '"%s"' % (partition))
def _getannotation(self, *args, **kw):
return self.getannotation(*args, **kw)
commit 49acbe0b394d91c7fe7f6bd92513efcbb544978c
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Mon Aug 4 21:40:05 2014 +0200
Only recognize the folder as already existing, if no partition is specified
diff --git a/pykolab/cli/cmd_rename_mailbox.py b/pykolab/cli/cmd_rename_mailbox.py
index 87d41f3..4efed0d 100644
--- a/pykolab/cli/cmd_rename_mailbox.py
+++ b/pykolab/cli/cmd_rename_mailbox.py
@@ -66,7 +66,7 @@ def execute(*args, **kw):
print >> sys.stderr, _("Source folder %r does not exist") % (source_folder)
sys.exit(1)
- if imap.has_folder(target_folder):
+ if imap.has_folder(target_folder) and partition == None:
print >> sys.stderr, _("Target folder %r already exists") % (target_folder)
sys.exit(1)
commit a15fe609702bffb00e6fb47e5129acce2798a07b
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Mon Aug 4 21:39:35 2014 +0200
Be compatible with what the Kolab Web Administration Panel is writing out
diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 752b4fc..f15d2c8 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1816,9 +1816,26 @@ class LDAP(pykolab.base.Base):
if entry.has_key('kolabfolderaclentry') and \
not entry['kolabfolderaclentry'] == None:
+ if isinstance(entry['kolabfolderaclentry'], basestring):
+ entry['kolabfolderaclentry'] = [ entry['kolabfolderaclentry'] ]
+
+ import copy
+ _acls = copy.deepcopy(entry['kolabfolderaclentry'])
+ entry['kolabfolderaclentry'] = []
+
+ for _entry in _acls:
+ if _entry[0] == "(":
+ entry['kolabfolderaclentry'].append(_entry)
+ continue
+
+ s,r = [x.strip() for x in _entry.split(',')]
+
+ entry['kolabfolderaclentry'].append("('%s', '%s', '%s')" % (folder_path, s, r))
+
self.imap._set_kolab_mailfolder_acls(
entry['kolabfolderaclentry']
)
+
elif entry['kolabfolderaclentry'] in [None,[]]:
for ace in self.imap.list_acls(folder_path):
aci_subject = ace.split()[0]
commit 542ec1d797130b674ed46a9d7a7e94c056f34266
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Mon Aug 4 21:38:55 2014 +0200
Add iTip module
diff --git a/pykolab/Makefile.am b/pykolab/Makefile.am
index a23aa6e..f2c4cf4 100644
--- a/pykolab/Makefile.am
+++ b/pykolab/Makefile.am
@@ -42,6 +42,10 @@ pykolab_imap_PYTHON = \
imap/__init__.py \
imap/cyrus.py
+pykolab_itipdir = $(pythondir)/$(PACKAGE)/itip
+pykolab_itip_PYTHON = \
+ itip/__init__.py
+
pykolab_pluginsdir = $(pythondir)/$(PACKAGE)/plugins
pykolab_plugins_PYTHON = \
plugins/__init__.py
More information about the commits
mailing list