Projects
Kolab:3.4
pykolab
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 127
View file
pykolab.spec
Changed
@@ -28,7 +28,7 @@ Summary: Kolab Groupware Solution Name: pykolab -Version: 0.7.5 +Version: 0.7.6 Release: 1%{?dist} License: GPLv3+ Group: Applications/System @@ -522,6 +522,12 @@ %attr(0700,%{kolab_user},%{kolab_group}) %dir %{_var}/spool/pykolab/wallace %changelog +* Wed Jan 14 2015 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.7.6-1 +- Fix LDAP authentication and user searching (#4218) +- Enable error logging for Roundcubemail (#4104) +- Fix comparison of datetime.datetime and datetime.date (#4079) +- Apply invitation policy also to aliases (#4074) + * Wed Dec 31 2014 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 0.7.5-1 - New upstream release - Fix default configuration for Roundcube plugin managesieve (#4103)
View file
debian.changelog
Changed
@@ -1,3 +1,12 @@ +pykolab (0.7.6-0~kolab1) unstable; urgency=low + + * Fix LDAP authentication and user searching (#4218) + * Enable error logging for Roundcubemail (#4104) + * Fix comparison of datetime.datetime and datetime.date (#4079) + * Apply invitation policy also to aliases (#4074) + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, 14 Jan 2015 01:49:00 +0100 + pykolab (0.7.5-0~kolab1) unstable; urgency=low * Fix default configuration for Roundcube plugin managesieve (#4103)
View file
pykolab-0.7.5.tar.gz/conf/kolab.conf -> pykolab-0.7.6.tar.gz/conf/kolab.conf
Changed
@@ -284,6 +284,39 @@ ; "j.doe@example.org). auth_attributes = mail, alias, uid +; Virtual List View control, and Server-Side Sorting control configuration. +; +; Configure these to allow the Web Administration Panel (API) to not have to +; search a non-database cn=config for the VLV configuration. +; +;vlv = [ +; { +; 'ou=People,dc=example,dc=org': { +; 'scope': 'sub', +; 'filter': '(objectclass=inetorgperson)', +; 'sort' : [ +; [ +; 'displayname', +; 'sn', +; 'givenname', +; 'cn' +; ] +; ] +; } +; }, +; { +; 'ou=Groups,dc=example,dc=org': { +; 'scope': 'sub', +; 'filter': '(objectclass=groupofuniquenames)', +; 'sort' : [ +; [ +; 'cn' +; ] +; ] +; } +; }, +; ] + [kolab_smtp_access_policy] cache_uri = mysql://user:pass@localhost/database cache_retention = 86400
View file
pykolab-0.7.5.tar.gz/configure.ac -> pykolab-0.7.6.tar.gz/configure.ac
Changed
@@ -1,4 +1,4 @@ -AC_INIT([pykolab], 0.7.5) +AC_INIT([pykolab], 0.7.6) AC_SUBST([RELEASE], 1) AC_CONFIG_SRCDIR(pykolab/constants.py.in)
View file
pykolab-0.7.5.tar.gz/pykolab/auth/__init__.py -> pykolab-0.7.6.tar.gz/pykolab/auth/__init__.py
Changed
@@ -216,6 +216,12 @@ def find_user_dn(self, login, kolabuser=False): return self._auth._find_user_dn(login, kolabuser); + def list_recipient_addresses(self, user): + return self._auth.list_recipient_addresses(user) + + def extract_recipient_addresses(self, entry): + return self._auth.extract_recipient_addresses(entry) + def list_domains(self, domain=None): """ List the domains using the auth_mechanism setting in the kolab
View file
pykolab-0.7.5.tar.gz/pykolab/auth/ldap/__init__.py -> pykolab-0.7.6.tar.gz/pykolab/auth/ldap/__init__.py
Changed
@@ -402,6 +402,34 @@ return utils.normalize(_entry_attrs) + def list_recipient_addresses(self, entry_id): + """ + Give a list of all valid recipient addresses for an LDAP entry + identified by its ID. + """ + mail_attributes = conf.get_list('ldap', 'mail_attributes') + entry = self.get_entry_attributes(entry_id, mail_attributes) + + return self.extract_recipient_addresses(entry) if entry is not None else [] + + def extract_recipient_addresses(self, entry): + """ + Extact a list of all valid recipient addresses for the given LDAP entry. + This includes all attributes configured for ldap.mail_attributes + """ + recipient_addresses = [] + mail_attributes = conf.get_list('ldap', 'mail_attributes') + + for attr in mail_attributes: + if entry.has_key(attr): + if isinstance(entry[attr], list): + recipient_addresses.extend(entry[attr]) + elif isinstance(entry[attr], basestring): + recipient_addresses.append(entry[attr]) + + return recipient_addresses + + def find_recipient(self, address="*", exclude_entry_id=None): """ Given an address string or list of addresses, find one or more valid @@ -2142,44 +2170,45 @@ domain_filter = conf.get('ldap', 'domain_filter') - if not domain == None: - domain_filter = domain_filter.replace('*', domain) + if not domain_filter == None: + if not domain == None: + domain_filter = domain_filter.replace('*', domain) - if not domain_base_dn == "": + if not domain_base_dn == "": - _results = self._search( - domain_base_dn, - ldap.SCOPE_SUBTREE, - domain_filter, - override_search='_regular_search' - ) - - domains = [] - - for _domain in _results: - (domain_dn, _domain_attrs) = _domain - domain_rootdn_attribute = conf.get( - 'ldap', - 'domain_rootdn_attribute' + _results = self._search( + domain_base_dn, + ldap.SCOPE_SUBTREE, + domain_filter, + override_search='_regular_search' ) - _domain_attrs = utils.normalize(_domain_attrs) - if _domain_attrs.has_key(domain_rootdn_attribute): - self.domain_rootdns[domain] = _domain_attrs[domain_rootdn_attribute] - return _domain_attrs[domain_rootdn_attribute] - else: - domain_name_attribute = self.config_get('domain_name_attribute') - if domain_name_attribute == None: - domain_name_attribute = 'associateddomain' + domains = [] + + for _domain in _results: + (domain_dn, _domain_attrs) = _domain + domain_rootdn_attribute = conf.get( + 'ldap', + 'domain_rootdn_attribute' + ) + _domain_attrs = utils.normalize(_domain_attrs) + if _domain_attrs.has_key(domain_rootdn_attribute): + self.domain_rootdns[domain] = _domain_attrs[domain_rootdn_attribute] + return _domain_attrs[domain_rootdn_attribute] - if isinstance(_domain_attrs[domain_name_attribute], list): - domain = _domain_attrs[domain_name_attribute][0] else: - domain = _domain_attrs[domain_name_attribute] + domain_name_attribute = self.config_get('domain_name_attribute') + if domain_name_attribute == None: + domain_name_attribute = 'associateddomain' - else: - if conf.has_option('ldap', 'base_dn'): - return conf.get('ldap', 'base_dn') + if isinstance(_domain_attrs[domain_name_attribute], list): + domain = _domain_attrs[domain_name_attribute][0] + else: + domain = _domain_attrs[domain_name_attribute] + + else: + if conf.has_option('ldap', 'base_dn'): + return conf.get('ldap', 'base_dn') self.domain_rootdns[domain] = utils.standard_root_dn(domain) return self.domain_rootdns[domain]
View file
pykolab-0.7.5.tar.gz/pykolab/xml/event.py -> pykolab-0.7.6.tar.gz/pykolab/xml/event.py
Changed
@@ -1134,17 +1134,21 @@ from kolab.calendaring import EventCal return EventCal(self.event) - def get_next_occurence(self, datetime): + def get_next_occurence(self, _datetime): if not hasattr(self, 'eventcal'): self.eventcal = self.to_event_cal() - next_cdatetime = self.eventcal.getNextOccurence(xmlutils.to_cdatetime(datetime, True)) + next_cdatetime = self.eventcal.getNextOccurence(xmlutils.to_cdatetime(_datetime, True)) next_datetime = xmlutils.from_cdatetime(next_cdatetime, True) if next_cdatetime is not None else None # cut infinite recurrence at a reasonable point - if next_datetime and not self.get_last_occurrence() and next_datetime > self._recurrence_end(): + if next_datetime and not self.get_last_occurrence() and next_datetime > xmlutils.to_dt(self._recurrence_end()): next_datetime = None + # next_datetime is always a cdatetime, convert to date if necessary + if not isinstance(self.get_start(), datetime.datetime): + next_datetime = datetime.date(next_datetime.year, next_datetime.month, next_datetime.day) + return next_datetime def get_occurence_end_date(self, datetime):
View file
pykolab-0.7.5.tar.gz/pykolab/xml/utils.py -> pykolab-0.7.6.tar.gz/pykolab/xml/utils.py
Changed
@@ -14,7 +14,7 @@ """ if isinstance(dt, datetime.date) and not isinstance(dt, datetime.datetime) or dt is not None and not hasattr(dt, 'hour'): - dt = datetime.datetime(dt.year, dt.month, dt.day, 0, 0, 0, 0, tzinfo=tzlocal()) + dt = datetime.datetime(dt.year, dt.month, dt.day, 0, 0, 0, 0, tzinfo=pytz.utc) elif isinstance(dt, datetime.datetime): if dt.tzinfo == None:
View file
pykolab-0.7.5.tar.gz/share/templates/roundcubemail/config.inc.php.tpl -> pykolab-0.7.6.tar.gz/share/templates/roundcubemail/config.inc.php.tpl
Changed
@@ -113,7 +113,7 @@ // Re-apply mandatory settings here. - \$config['debug_level'] = 0; + \$config['debug_level'] = 1; \$config['devel_mode'] = false; \$config['log_driver'] = 'file'; \$config['log_date_format'] = 'd-M-Y H:i:s,u O';
View file
pykolab-0.7.5.tar.gz/tests/unit/test-003-event.py -> pykolab-0.7.6.tar.gz/tests/unit/test-003-event.py
Changed
@@ -533,6 +533,18 @@ self.assertEqual(next_instance.get_start().month, 7) self.assertFalse(next_instance.is_recurring()) + # check get_next_occurence() with an infinitely recurring all-day event + rrule = kolabformat.RecurrenceRule() + rrule.setFrequency(kolabformat.RecurrenceRule.Yearly) + self.event.set_recurrence(rrule); + + self.event.set_start(datetime.date(2014, 5, 1)) + self.event.set_end(datetime.date(2014, 5, 1)) + next_date = self.event.get_next_occurence(datetime.date(2015, 1, 1)) + self.assertIsInstance(next_date, datetime.date) + self.assertEqual(next_date.year, 2015) + self.assertEqual(next_date.month, 5) + def test_021_calendaring_no_recurrence(self): _start = datetime.datetime(2014, 2, 1, 14, 30, 00, tzinfo=pytz.timezone("Europe/London")) self.event = Event()
View file
pykolab-0.7.5.tar.gz/wallace/module_invitationpolicy.py -> pykolab-0.7.6.tar.gz/wallace/module_invitationpolicy.py
Changed
@@ -247,6 +247,7 @@ any_itips = False recipient_email = None + recipient_emails = [] recipient_user_dn = None # An iTip message may contain multiple events. Later on, test if the message @@ -271,7 +272,10 @@ for recipient in recipients: recipient_user_dn = user_dn_from_email_address(recipient) if recipient_user_dn: + receiving_user = auth.get_entry_attributes(None, recipient_user_dn, ['*']) + recipient_emails = auth.extract_recipient_addresses(receiving_user) recipient_email = recipient + log.debug(_("Recipient emails for %s: %r") % (recipient_user_dn, recipient_emails), level=8) break if not any_itips: @@ -286,12 +290,13 @@ # for replies, the organizer is the recipient if itip_event['method'] == 'REPLY': - user_attendees = [itip_event['organizer']] if str(itip_event['organizer']).split(':')[-1] == recipient_email else [] + organizer_mailto = str(itip_event['organizer']).split(':')[-1] + user_attendees = [organizer_mailto] if organizer_mailto in recipient_emails else [] else: # Limit the attendees to the one that is actually invited with the current message. attendees = [str(a).split(':')[-1] for a in (itip_event['attendees'] if itip_event.has_key('attendees') else [])] - user_attendees = [a for a in attendees if a == recipient_email] + user_attendees = [a for a in attendees if a in recipient_emails] if itip_event.has_key('organizer'): sender_email = itip_event['xml'].get_organizer().email() @@ -301,9 +306,11 @@ log.info(_("No user attendee matching envelope recipient %s, skip message") % (recipient_email)) return filepath - receiving_user = auth.get_entry_attributes(None, recipient_user_dn, ['*']) log.debug(_("Receiving user: %r") % (receiving_user), level=8) + # set recipient_email to the matching attendee mailto: address + recipient_email = user_attendees[0] + # change gettext language to the preferredlanguage setting of the receiving user if receiving_user.has_key('preferredlanguage'): pykolab.translate.setUserLanguage(receiving_user['preferredlanguage'])
View file
pykolab.dsc
Changed
@@ -2,7 +2,7 @@ Source: pykolab Binary: pykolab, kolab-cli, kolab-conf, kolab-saslauthd, kolab-server, kolab-telemetry, kolab-xml, wallace Architecture: all -Version: 0.7.5-0~kolab1 +Version: 0.7.6-0~kolab1 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org @@ -40,5 +40,5 @@ pykolab deb python optional wallace deb python optional Files: - 00000000000000000000000000000000 0 pykolab-0.7.5.tar.gz + 00000000000000000000000000000000 0 pykolab-0.7.6.tar.gz 00000000000000000000000000000000 0 debian.tar.gz
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.