add tests to email
This commit is contained in:
@@ -103,6 +103,7 @@ def unlink(org_id: str, user_id: str):
|
||||
def _create_user(user: User, org: Org) -> bool:
|
||||
now_ = now()
|
||||
user_id = uuid4()
|
||||
email_verified = '@users.noreply.saladeaula.digital' in user.email
|
||||
|
||||
try:
|
||||
with dyn.transact_writer() as transact:
|
||||
@@ -111,7 +112,7 @@ def _create_user(user: User, org: Org) -> bool:
|
||||
**user.model_dump(),
|
||||
'id': user_id,
|
||||
'sk': '0',
|
||||
'email_verified': False,
|
||||
'email_verified': email_verified,
|
||||
'tenant_id': {org.id},
|
||||
# Post-migration: uncomment the folloing line
|
||||
# 'org_id': {org.id},
|
||||
@@ -123,7 +124,7 @@ def _create_user(user: User, org: Org) -> bool:
|
||||
'id': user_id,
|
||||
# Post-migration: rename `emails` to `EMAIL`
|
||||
'sk': f'emails#{user.email}',
|
||||
'email_verified': False,
|
||||
'email_verified': email_verified,
|
||||
'email_primary': True,
|
||||
'created_at': now_,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user