4 commits - conf/kolab.conf pykolab/auth pykolab/imap

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Wed Aug 13 16:30:00 CEST 2014


 conf/kolab.conf               |    6 ++++++
 pykolab/auth/ldap/__init__.py |    2 +-
 pykolab/imap/__init__.py      |   11 ++++++++++-
 3 files changed, 17 insertions(+), 2 deletions(-)

New commits:
commit 3cc6d87fb7ac57322e4e8b7d0321f280a49344cc
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Aug 13 16:29:50 2014 +0200

    Supply the default configuration for sharedfolder_acl_entry_attribute

diff --git a/conf/kolab.conf b/conf/kolab.conf
index c97757b..80d1f53 100644
--- a/conf/kolab.conf
+++ b/conf/kolab.conf
@@ -210,6 +210,9 @@ kolab_group_filter = (|(objectclass=kolabgroupofuniquenames)(objectclass=kolabgr
 sharedfolder_base_dn = ou=Shared Folders,%(base_dn)s
 sharedfolder_filter = (objectclass=kolabsharedfolder)
 
+; The attribute entry name that controls the ACLs set on a shared folder
+sharedfolder_acl_entry_attribute = acl
+
 ; Same again. Resources live in a different OU structure or;
 ;
 ; - They would appear in the address book(s) as distribution lists or individual contacts,


commit b52a188db9dbc7ed4d8d04a92d66c86e61f9dcfa
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Aug 13 16:28:46 2014 +0200

    Use the correct (actually configured) acl entry attribute for shared folders

diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index f15d2c8..c276403 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1773,7 +1773,7 @@ class LDAP(pykolab.base.Base):
                     'kolabfoldertype'
                 )
 
-        folderacl_entry_attribute = conf.get('ldap', 'folderacl_entry_attribute')
+        folderacl_entry_attribute = conf.get('ldap', 'sharedfolder_acl_entry_attribute')
         if folderacl_entry_attribute == None:
             folderacl_entry_attribute = 'acl'
 


commit eeb52be1e300509cb1129e6951e7451cd441957c
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Aug 13 16:28:26 2014 +0200

    Do not fail as miserably if setting an ACL fails

diff --git a/pykolab/imap/__init__.py b/pykolab/imap/__init__.py
index f52dc9f..b3af455 100644
--- a/pykolab/imap/__init__.py
+++ b/pykolab/imap/__init__.py
@@ -364,7 +364,16 @@ class IMAP(object):
             _acl = [x for x in _acl.split() if x not in acl_map['subtract'].split()]
             acl = ''.join(list(set(_acl)))
 
-        self.imap.sam(self.folder_utf7(folder), identifier, acl)
+        try:
+            self.imap.sam(self.folder_utf7(folder), identifier, acl)
+        except Exception, errmsg:
+            log.error(
+                    _("Could not set ACL for %s on folder %s: %r") % (
+                            identifier,
+                            folder,
+                            errmsg
+                        )
+                )
 
     def set_metadata(self, folder, metadata_path, metadata_value, shared=True):
         """


commit 3bf16dfc05fcad3cb01bf0a3b21611db4839e8ce
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Wed Aug 13 16:27:51 2014 +0200

    Supply the default value for imap/virtual_domains

diff --git a/conf/kolab.conf b/conf/kolab.conf
index 128f0b8..c97757b 100644
--- a/conf/kolab.conf
+++ b/conf/kolab.conf
@@ -136,6 +136,9 @@ autocreate_folders = {
             },
     }
 
+[imap]
+virtual_domains = userid
+
 [ldap]
 ; The URI to LDAP
 ldap_uri = ldap://localhost:389




More information about the commits mailing list