diff --git a/.ds.baseline b/.ds.baseline
index b84a53351..6d2034588 100644
--- a/.ds.baseline
+++ b/.ds.baseline
@@ -407,16 +407,6 @@
"is_secret": false
}
],
- "app/main/views/sign_in.py": [
- {
- "type": "Private Key",
- "filename": "app/main/views/sign_in.py",
- "hashed_secret": "1348b145fa1a555461c1b790a2f66614781091e9",
- "is_verified": false,
- "line_number": 27,
- "is_secret": false
- }
- ],
"app/templates/new/components/head.html": [
{
"type": "Base64 High Entropy String",
@@ -702,5 +692,5 @@
}
]
},
- "generated_at": "2024-07-11T16:37:23Z"
+ "generated_at": "2024-07-24T14:13:02Z"
}
diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss
index f82e63ad7..335a56ee6 100644
--- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss
+++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss
@@ -327,6 +327,16 @@ td.table-empty-message {
bottom: 0;
}
+@media (max-width: units('desktop-lg')) {
+ .table-overflow-x-auto {
+ overflow-x: auto;
+ table {
+ min-width: 768px;
+ }
+ }
+}
+
+
// Dashboard
.dashboard {
@@ -376,9 +386,6 @@ td.table-empty-message {
background-image: url(../img/material-icons/description.svg);
}
}
- .table-wrapper {
- overflow-x: scroll;
- }
}
.dashboard-table {
diff --git a/app/main/views/register.py b/app/main/views/register.py
index 761582b3d..19187a47c 100644
--- a/app/main/views/register.py
+++ b/app/main/views/register.py
@@ -230,7 +230,12 @@ def set_up_your_profile():
debug_msg(
f"Added user {usr.email_address} to service {invite_data['service_id']}"
)
- return redirect(url_for("main.show_accounts_or_dashboard"))
+ # notify-admin-1766
+ # redirect new users to templates area of new service instead of dashboard
+ service_id = invite_data["service_id"]
+ url = url_for(".service_dashboard", service_id=service_id)
+ url = f"{url}/templates"
+ return redirect(url)
elif login_gov_error:
current_app.logger.error(f"login.gov error: {login_gov_error}")
diff --git a/app/main/views/sign_in.py b/app/main/views/sign_in.py
index 9f089fe42..2440473fb 100644
--- a/app/main/views/sign_in.py
+++ b/app/main/views/sign_in.py
@@ -29,12 +29,18 @@ from notifications_utils.url_safe_token import generate_token
def _reformat_keystring(orig):
- new_keystring = orig.replace("-----BEGIN PRIVATE KEY-----", "")
- new_keystring = new_keystring.replace("-----END PRIVATE KEY-----", "")
+ private_key = "PRIVATE " # pragma: allowlist secret
+ private_key = f"{private_key} KEY"
+ new_keystring = orig.replace(f"-----BEGIN {private_key}-----", "")
+ new_keystring = new_keystring.replace(f"-----END {private_key}-----", "")
new_keystring = new_keystring.strip()
new_keystring = new_keystring.replace(" ", "\n")
new_keystring = "\n".join(
- ["-----BEGIN PRIVATE KEY-----", new_keystring, "-----END PRIVATE KEY-----"]
+ [
+ f"-----BEGIN {private_key}-----",
+ new_keystring,
+ f"-----END {private_key}-----",
+ ]
)
new_keystring = f"{new_keystring}\n"
return new_keystring
@@ -65,7 +71,9 @@ def _get_access_token(code, state):
response = requests.post(url, headers=headers)
if response.json().get("access_token") is None:
# Capture the response json here so it hopefully shows up in error reports
- current_app.logger.error(f"Error when getting access token {response.json()}")
+ current_app.logger.error(
+ f"Error when getting access token {response.json()} #notify-admin-1505"
+ )
raise KeyError(f"'access_token' {response.json()}")
access_token = response.json()["access_token"]
return access_token
@@ -90,7 +98,9 @@ def _do_login_dot_gov():
login_gov_error = request.args.get("error")
if login_gov_error:
- current_app.logger.error(f"login.gov error: {login_gov_error}")
+ current_app.logger.error(
+ f"login.gov error: {login_gov_error} #notify-admin-1505"
+ )
raise Exception(f"Could not login with login.gov {login_gov_error}")
elif code and state:
@@ -100,12 +110,15 @@ def _do_login_dot_gov():
user_email, user_uuid = _get_user_email_and_uuid(access_token)
if not is_gov_user(user_email):
current_app.logger.error(
- "invited user has a non-government email address."
+ "invited user has a non-government email address. #notify-admin-1505"
)
flash("You must use a government email address.")
abort(403)
redirect_url = request.args.get("next")
user = user_api_client.get_user_by_uuid_or_email(user_uuid, user_email)
+ current_app.logger.info(
+ f"Retrieved user {user['id']} from db #notify-admin-1505"
+ )
# Check if the email needs to be revalidated
is_fresh_email = is_less_than_days_ago(
@@ -115,9 +128,10 @@ def _do_login_dot_gov():
return verify_email(user, redirect_url)
usr = User.from_email_address(user["email_address"])
+ current_app.logger.info(f"activating user {usr.id} #notify-admin-1505")
activate_user(usr.id)
except BaseException as be: # noqa B036
- current_app.logger.error(be)
+ current_app.logger.error(f"Error signing in: {be} #notify-admin-1505 ")
error(401)
return redirect(url_for("main.show_accounts_or_dashboard", next=redirect_url))
diff --git a/app/main/views/verify.py b/app/main/views/verify.py
index fbe510643..be0a0532d 100644
--- a/app/main/views/verify.py
+++ b/app/main/views/verify.py
@@ -38,6 +38,7 @@ def verify_email(token):
current_app.config["EMAIL_EXPIRY_SECONDS"],
)
except SignatureExpired:
+ current_app.logger.error("Email link expired #notify-admin-1505")
flash(
"The link in the email we sent you has expired. We've sent you a new one."
)
@@ -50,6 +51,9 @@ def verify_email(token):
abort(404)
if user.is_active:
+ current_app.logger.error(
+ f"User is using an invite link but is already logged in {user.id} #notify-admin-1505"
+ )
flash("That verification link has expired.")
return redirect(url_for("main.sign_in"))
@@ -59,6 +63,7 @@ def verify_email(token):
user.send_verify_code()
session["user_details"] = {"email": user.email_address, "id": user.id}
+ current_app.logger.info(f"Email verified for user {user.id} #notify-admin-1505")
return redirect(url_for("main.verify"))
@@ -78,5 +83,7 @@ def activate_user(user_id):
return redirect(url_for("main.organization_dashboard", org_id=organization_id))
else:
activated_user = user.activate()
+ current_app.logger.info(f"Activated user {user.id} #notify-admin-1505")
activated_user.login()
+ current_app.logger.info(f"Logged in user {user.id} #notify-admin-1505")
return redirect(url_for("main.add_service", first="first"))
diff --git a/app/templates/partials/jobs/notifications.html b/app/templates/partials/jobs/notifications.html
index 5787fb3d4..379a8efef 100644
--- a/app/templates/partials/jobs/notifications.html
+++ b/app/templates/partials/jobs/notifications.html
@@ -22,7 +22,7 @@
{% else %}
{% if notifications %}
-
+
{% endif %}
{% if job.still_processing %}
diff --git a/app/templates/partials/notifications/notifications.html b/app/templates/partials/notifications/notifications.html
index aae3e214f..e155fdb1a 100644
--- a/app/templates/partials/notifications/notifications.html
+++ b/app/templates/partials/notifications/notifications.html
@@ -1,8 +1,8 @@
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading, notification_status_field %}
{% from "components/page-footer.html" import page_footer %}
-
-
+
+
{% call(item, row_number) list_table(
[notification],
diff --git a/app/templates/views/activity/notifications.html b/app/templates/views/activity/notifications.html
index 9ea9b3f81..f099e7f53 100644
--- a/app/templates/views/activity/notifications.html
+++ b/app/templates/views/activity/notifications.html
@@ -5,7 +5,7 @@
{% if notifications %}
-
+
{% endif %}
{% call(item, row_number) list_table(
diff --git a/app/templates/views/api/callbacks.html b/app/templates/views/api/callbacks.html
index 2f8cfbf2a..e0c83cc19 100644
--- a/app/templates/views/api/callbacks.html
+++ b/app/templates/views/api/callbacks.html
@@ -14,8 +14,8 @@
{% block maincolumn_content %}
{{ page_header('Callbacks') }}
-
-
+
+
{% call mapping_table(
caption='General',
field_headings=['Label', 'Value', 'Action'],
diff --git a/app/templates/views/check/preview.html b/app/templates/views/check/preview.html
index 32b158013..2664cbe27 100644
--- a/app/templates/views/check/preview.html
+++ b/app/templates/views/check/preview.html
@@ -41,7 +41,7 @@
-