diff --git a/VERSION.txt b/VERSION.txt index 7dea76e..6d7de6e 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.0.1 +1.0.2 diff --git a/ceod/model/LDAPService.py b/ceod/model/LDAPService.py index 22f14f6..7c1b96c 100644 --- a/ceod/model/LDAPService.py +++ b/ceod/model/LDAPService.py @@ -171,6 +171,8 @@ class LDAPService: else: assert user.given_name and user.sn, \ 'First name and last name must be specified for new members' + assert user.terms or user.non_member_terms, \ + 'terms and non_member_terms cannot both be empty' min_id, max_id = self.member_min_id, self.member_max_id object_classes.append('member') if user.mail_local_addresses: diff --git a/ceod/model/User.py b/ceod/model/User.py index ff7671a..1bbaa38 100644 --- a/ceod/model/User.py +++ b/ceod/model/User.py @@ -33,8 +33,6 @@ class User: is_club: bool = False, ldap3_entry: Union[ldap3.Entry, None] = None, ): - if not is_club and not terms and not non_member_terms: - raise Exception('terms and non_member_terms cannot both be empty') cfg = component.getUtility(IConfig) self.uid = uid diff --git a/debian/changelog b/debian/changelog index 1dbee55..e5c7a30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ceo (1.0.2-buster1) buster; urgency=medium + + * Put term check into LDAPService. + + -- Max Erenberg Tue, 02 Nov 2021 05:29:00 +0000 + ceo (1.0.1-buster1) buster; urgency=high * Add cryptography package to requirements.txt