forked from public/pyceo
move term check to LDAPService instead of User constructor
This commit is contained in:
parent
dbbc533111
commit
729f443e72
|
@ -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
|
||||
|
|
|
@ -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…
Reference in New Issue