2 commits - pykolab/auth pykolab/setup

Jeroen van Meeuwen vanmeeuwen at kolabsys.com
Tue Aug 19 13:39:35 CEST 2014


 pykolab/auth/ldap/__init__.py |   12 ++++--------
 pykolab/setup/setup_mysql.py  |    1 +
 2 files changed, 5 insertions(+), 8 deletions(-)

New commits:
commit fff8fd1189e52eab6e42cda1885cc782969d6a61
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date:   Tue Aug 19 13:39:15 2014 +0200

    Add kolab_smtp_access_policy/cache_uri setting to set

diff --git a/pykolab/setup/setup_mysql.py b/pykolab/setup/setup_mysql.py
index 5f8ab4a..fb1b102 100644
--- a/pykolab/setup/setup_mysql.py
+++ b/pykolab/setup/setup_mysql.py
@@ -161,6 +161,7 @@ password='%s'
         p2.communicate()
 
         conf.command_set('kolab_wap', 'sql_uri', 'mysql://kolab:%s@localhost/kolab' % (mysql_kolab_password))
+        conf.command_set('kolab_smtp_access_policy', 'cache_uri', 'mysql://kolab:%s@localhost/kolab' % (mysql_kolab_password))
     else:
         log.warning(_("Could not find the MySQL Kolab schema file"))
 


commit decbb7d37719074d1c63dd26fd1120c9646e7549
Author: Daniel Hoffend <dh at dotlan.net>
Date:   Tue Aug 19 13:28:43 2014 +0200

    fix splitting of imap acl/aci from ldap entry (#3351)

diff --git a/pykolab/auth/ldap/__init__.py b/pykolab/auth/ldap/__init__.py
index 23b80e8..b9d0749 100644
--- a/pykolab/auth/ldap/__init__.py
+++ b/pykolab/auth/ldap/__init__.py
@@ -1235,7 +1235,7 @@ class LDAP(pykolab.base.Base):
 
             for acl_entry in entry[folderacl_entry_attribute]:
                 acl_access = acl_entry.split()[-1]
-                aci_subject = ' '.join(acl_entry.split()[:-1])
+                aci_subject = ', '.join(acl_entry.split(', ')[:-1])
 
                 log.debug(_("Found a subject %r with access %r") % (aci_subject, acl_access), level=8)
 
@@ -1260,6 +1260,7 @@ class LDAP(pykolab.base.Base):
 
         if not self.imap.shared_folder_exists(folder_path):
             self.imap.shared_folder_create(folder_path, server)
+            self.imap.set_acl(folder_path, 'anyone', '')
 
         if entry.has_key('kolabfoldertype') and \
                 not entry['kolabfoldertype'] == None:
@@ -1275,8 +1276,6 @@ class LDAP(pykolab.base.Base):
             self.imap._set_kolab_mailfolder_acls(
                     entry['kolabfolderaclentry']
                 )
-        else:
-            self.imap.set_acl(folder_path, 'anyone', '')
 
         if entry.has_key(delivery_address_attribute) and \
                 not entry[delivery_address_attribute] == None:
@@ -1617,7 +1616,7 @@ class LDAP(pykolab.base.Base):
 
             for acl_entry in entry[folderacl_entry_attribute]:
                 acl_access = acl_entry.split()[-1]
-                aci_subject = ' '.join(acl_entry.split()[:-1])
+                aci_subject = ', '.join(acl_entry.split(', ')[:-1])
 
                 log.debug(_("Found a subject %r with access %r") % (aci_subject, acl_access), level=8)
 
@@ -1642,6 +1641,7 @@ class LDAP(pykolab.base.Base):
 
         if not self.imap.shared_folder_exists(folder_path):
             self.imap.shared_folder_create(folder_path, server)
+            self.imap.set_acl(folder_path, 'anyone', '')
 
         if entry.has_key('kolabfoldertype') and \
                 not entry['kolabfoldertype'] == None:
@@ -1650,8 +1650,6 @@ class LDAP(pykolab.base.Base):
                     folder_path,
                     entry['kolabfoldertype']
                 )
-        else:
-            self.imap.set_acl(folder_path, 'anyone', '')
 
         if entry.has_key('kolabfolderaclentry') and \
                 not entry['kolabfolderaclentry'] == None:
@@ -1659,8 +1657,6 @@ class LDAP(pykolab.base.Base):
             self.imap._set_kolab_mailfolder_acls(
                     entry['kolabfolderaclentry']
                 )
-        else:
-            self.imap.set_acl(folder_path, 'anyone', '')
 
         if entry.has_key(delivery_address_attribute) and \
                 not entry[delivery_address_attribute] == None:




More information about the commits mailing list