move term check to LDAPService instead of User constructor

pull/34/head
Max Erenberg 1 year ago
parent dbbc533111
commit 729f443e72
  1. 2
      VERSION.txt
  2. 2
      ceod/model/LDAPService.py
  3. 2
      ceod/model/User.py
  4. 6
      debian/changelog

@ -1 +1 @@
1.0.1
1.0.2

@ -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:

@ -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

6
debian/changelog vendored

@ -1,3 +1,9 @@
ceo (1.0.2-buster1) buster; urgency=medium
* Put term check into LDAPService.
-- Max Erenberg <merenber@csclub.uwaterloo.ca> Tue, 02 Nov 2021 05:29:00 +0000
ceo (1.0.1-buster1) buster; urgency=high
* Add cryptography package to requirements.txt

Loading…
Cancel
Save