mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 14:29:25 -04:00
Add email_access_valdiated_at field to user table, populate it
and update it when users have to use their email to interact with Notify service. Initial population: If user has email_auth, set last_validated_at to logged_in_at. If user has sms_auth, set it to created_at. Then: Update email_access_valdiated_at date when: - user with email_auth logs in - new user is created - user resets password when logged out, meaning we send them an email with a link they have to click to reset their password.
This commit is contained in:
@@ -1189,7 +1189,7 @@ def test_add_existing_user_to_another_service_with_all_permissions(
|
||||
mobile_number='+4477123456'
|
||||
)
|
||||
# they must exist in db first
|
||||
save_model_user(user_to_add)
|
||||
save_model_user(user_to_add, validated_email_access=True)
|
||||
|
||||
data = {
|
||||
"permissions": [
|
||||
@@ -1253,7 +1253,7 @@ def test_add_existing_user_to_another_service_with_send_permissions(notify_api,
|
||||
password='password',
|
||||
mobile_number='+4477123456'
|
||||
)
|
||||
save_model_user(user_to_add)
|
||||
save_model_user(user_to_add, validated_email_access=True)
|
||||
|
||||
data = {
|
||||
"permissions": [
|
||||
@@ -1301,7 +1301,7 @@ def test_add_existing_user_to_another_service_with_manage_permissions(notify_api
|
||||
password='password',
|
||||
mobile_number='+4477123456'
|
||||
)
|
||||
save_model_user(user_to_add)
|
||||
save_model_user(user_to_add, validated_email_access=True)
|
||||
|
||||
data = {
|
||||
"permissions": [
|
||||
@@ -1348,7 +1348,7 @@ def test_add_existing_user_to_another_service_with_folder_permissions(notify_api
|
||||
password='password',
|
||||
mobile_number='+4477123456'
|
||||
)
|
||||
save_model_user(user_to_add)
|
||||
save_model_user(user_to_add, validated_email_access=True)
|
||||
|
||||
folder_1 = create_template_folder(sample_service)
|
||||
folder_2 = create_template_folder(sample_service)
|
||||
@@ -1389,7 +1389,7 @@ def test_add_existing_user_to_another_service_with_manage_api_keys(notify_api,
|
||||
password='password',
|
||||
mobile_number='+4477123456'
|
||||
)
|
||||
save_model_user(user_to_add)
|
||||
save_model_user(user_to_add, validated_email_access=True)
|
||||
|
||||
data = {"permissions": [{"permission": "manage_api_keys"}]}
|
||||
|
||||
@@ -1428,7 +1428,7 @@ def test_add_existing_user_to_non_existing_service_returns404(notify_api,
|
||||
password='password',
|
||||
mobile_number='+4477123456'
|
||||
)
|
||||
save_model_user(user_to_add)
|
||||
save_model_user(user_to_add, validated_email_access=True)
|
||||
|
||||
incorrect_id = uuid.uuid4()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user