fix: address final review of event invitations
Mask invite, check-in and registration-link tokens in gateway logs. Audit the attended flag only when it really changes. Drop a salesperson who left the event team from invite registrations. Answer 404 for check-in by guest on a disabled event. Deployment notes and the release-check record updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
c4183facf6
commit
2af360c775
12 files changed
+74
-11
No files matched your search
+1
@@ -151,6 +151,7 @@ public class AdminEventGuestService {
|
||||
throw AdminEventLeadService.required(List.of("guestIds"));
|
||||
}
|
||||
Set<Long> wanted = allUnsent ? Set.of() : new HashSet<>(r.guestIds());
|
||||
// ponytail: one synchronous email call per guest inside the request; fine at current sizes, move to async/batched above ~500 guests.
|
||||
List<Long> sentIds = new ArrayList<>();
|
||||
int skippedNoEmail = 0;
|
||||
try {
|
||||
|
||||
+1
-1
@@ -289,7 +289,7 @@ public class AdminEventLeadService {
|
||||
if (!new HashSet<>(interestIds).equals(new HashSet<>(longs(current.get("interestIds"))))) changed.add("interestIds");
|
||||
if (!Objects.equals(body.get("nextFollowUpDate"), current.get("nextFollowUpDate") == null ? null : current.get("nextFollowUpDate").toString())) changed.add("nextFollowUpDate");
|
||||
if (!Objects.equals(body.get("notes"), current.get("notes"))) changed.add("notes");
|
||||
if (r.attended() != null && !r.attended().equals(current.get("attended"))) changed.add("attended");
|
||||
if (r.attended() != null && !r.attended().equals(current.get("attendedAt") != null)) changed.add("attended");
|
||||
if (!changed.isEmpty()) AuditChanges.fields(changed.toArray(String[]::new));
|
||||
return view(saved, known, new HashMap<>());
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
app:
|
||||
api-key: ${APIKEY:}
|
||||
api-gateway-url: ${APIGATEWAYURL}
|
||||
# TODO: confirm real customer-portal host
|
||||
# Required outside the local profile (no default): invitation emails link to <this>/i/<token>.
|
||||
admin-portal-base-url: ${ADMIN_PORTAL_BASE_URL}
|
||||
# TODO: confirm real customer-portal host
|
||||
customer-portal-base-url: ${CUSTOMER_PORTAL_BASE_URL:https://user.tastefullyexpo.com}
|
||||
system:
|
||||
format:
|
||||
|
||||
+13
-1
@@ -36,6 +36,7 @@ class AdminEventLeadServiceAuditChangesTest {
|
||||
private RestTemplateCustomUtil rest;
|
||||
private AdminEventLeadService service;
|
||||
private MockedStatic<HttpReqRespUtils> http;
|
||||
private final Map<String, Object> detail = new LinkedHashMap<>();
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
@@ -61,7 +62,7 @@ class AdminEventLeadServiceAuditChangesTest {
|
||||
.thenReturn(ResponseEntity.ok(List.of(
|
||||
Map.of("id", 3L, "companyId", COMPANY, "name", "Cookware", "active", true, "sortOrder", 0),
|
||||
Map.of("id", 4L, "companyId", COMPANY, "name", "Kitchen", "active", true, "sortOrder", 0))));
|
||||
Map<String, Object> d = new LinkedHashMap<>();
|
||||
Map<String, Object> d = detail;
|
||||
d.put("eventLeadUuid", EL);
|
||||
d.put("companyId", COMPANY);
|
||||
d.put("eventUuid", EV);
|
||||
@@ -98,6 +99,17 @@ class AdminEventLeadServiceAuditChangesTest {
|
||||
assertThat(json).doesNotContain("private call note", "old note", "HOT", "2027-01-20");
|
||||
}
|
||||
|
||||
@Test
|
||||
void update_attendedEqualToCurrentStateIsNotAudited() {
|
||||
detail.put("attendedAt", "2027-01-20T10:00:00");
|
||||
|
||||
update(new AdminEventLeadUpdateRequest(21L, "WARM", "OPEN", List.of(3L), "2027-01-20", "old note", true));
|
||||
assertThat(AuditChanges.current()).isNull();
|
||||
|
||||
update(new AdminEventLeadUpdateRequest(21L, "WARM", "OPEN", List.of(3L), "2027-01-20", "old note", false));
|
||||
assertThat((List<String>) AuditChanges.current().get("fields")).containsExactly("attended");
|
||||
}
|
||||
|
||||
@Test
|
||||
void update_nothingChangedRecordsNothing() {
|
||||
update(new AdminEventLeadUpdateRequest(21L, "WARM", "OPEN", List.of(3L), "2027-01-20", "old note"));
|
||||
|
||||
Reference in new issue
Block a user