Activate users created with account link (#1124)

This commit is contained in:
Carlos Quintana 2022-06-29 16:55:20 +02:00 committed by GitHub
parent 9abb8aa47f
commit d06470a3c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -129,6 +129,7 @@ class NewUserStrategy(ClientMergeStrategy):
email=self.link_request.email,
name=self.link_request.name,
password=random_string(20),
activated=True,
from_partner=self.link_request.from_partner,
)
partner_user = PartnerUser.create(

View file

@ -89,6 +89,7 @@ def test_login_case_from_partner():
assert User.FLAG_CREATED_FROM_PARTNER == (
res.user.flags & User.FLAG_CREATED_FROM_PARTNER
)
assert res.user.activated is True
def test_login_case_from_web():
@ -104,6 +105,7 @@ def test_login_case_from_web():
assert res.strategy == NewUserStrategy.__name__
assert res.user is not None
assert 0 == (res.user.flags & User.FLAG_CREATED_FROM_PARTNER)
assert res.user.activated is True
def test_get_strategy_existing_sl_user():