2 commits - conf/kolab.conf pykolab/auth
Jeroen van Meeuwen
vanmeeuwen at kolabsys.com
Sun Jul 27 16:28:08 CEST 2014
conf/kolab.conf | 4 ++++
pykolab/auth/ldap/cache.py | 10 +++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit 082464b7e59451a2c993a9851de117c979cc24af
Merge: 063eb95 5248493
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Sun Jul 27 16:28:03 2014 +0200
Merge branch 'master' of ssh://git.kolabsys.com/git/pykolab
commit 063eb95d66064f8092a5ad918842e33cba9b8f36
Author: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen at kolabsys.com>
Date: Sun Jul 27 14:17:49 2014 +0200
Ensure the correct format for the modifytimestamp_format is included in the default configuration, and it's obtained as a raw value
diff --git a/conf/kolab.conf b/conf/kolab.conf
index 2f8ea2b..d9a6a5a 100644
--- a/conf/kolab.conf
+++ b/conf/kolab.conf
@@ -234,6 +234,10 @@ domain_rootdn_attribute = inetdomainbasedn
; The attribute that holds the quota.
quota_attribute = mailquota
+
+; The format of the modifytimestamp attribute values
+modifytimestamp_format = %Y%m%d%H%M%SZ
+
; A unique attribute that can be used to identify the entry beyond renames and
; moves. Note that 'nsuniqueid' is specific to all Netscape-based directory
; services.
diff --git a/pykolab/auth/ldap/cache.py b/pykolab/auth/ldap/cache.py
index c21d9a6..eaf2ffa 100644
--- a/pykolab/auth/ldap/cache.py
+++ b/pykolab/auth/ldap/cache.py
@@ -63,7 +63,7 @@ class Entry(object):
self.uniqueid = uniqueid
self.result_attribute = result_attr
- modifytimestamp_format = conf.get('ldap', 'modifytimestamp_format')
+ modifytimestamp_format = conf.get_raw('ldap', 'modifytimestamp_format')
if modifytimestamp_format == None:
modifytimestamp_format = "%Y%m%d%H%M%SZ"
@@ -95,7 +95,7 @@ mapper(Entry, entry_table)
##
def delete_entry(domain, entry):
- result_attribute = conf.get('cyrus-sasl', 'result_attribute')
+ result_attribute = conf.get_raw('cyrus-sasl', 'result_attribute')
db = init_db(domain)
_entry = db.query(Entry).filter_by(uniqueid=entry['id']).first()
@@ -105,7 +105,7 @@ def delete_entry(domain, entry):
db.commit()
def get_entry(domain, entry, update=True):
- result_attribute = conf.get('cyrus-sasl', 'result_attribute')
+ result_attribute = conf.get_raw('cyrus-sasl', 'result_attribute')
_entry = None
@@ -139,7 +139,7 @@ def get_entry(domain, entry, update=True):
db.commit()
_entry = db.query(Entry).filter_by(uniqueid=entry['id']).first()
else:
- modifytimestamp_format = conf.get('ldap', 'modifytimestamp_format')
+ modifytimestamp_format = conf.get_raw('ldap', 'modifytimestamp_format')
if modifytimestamp_format == None:
modifytimestamp_format = "%Y%m%d%H%M%SZ"
@@ -188,7 +188,7 @@ def last_modify_timestamp(domain):
db = init_db(domain)
last_change = db.query(Entry).order_by(desc(Entry.last_change)).first()
- modifytimestamp_format = conf.get('ldap', 'modifytimestamp_format')
+ modifytimestamp_format = conf.get_raw('ldap', 'modifytimestamp_format')
if modifytimestamp_format == None:
modifytimestamp_format = "%Y%m%d%H%M%SZ"
More information about the commits
mailing list