This commit is contained in:
2026-08-05 16:26:10 +08:00
parent 06f7f9d2f2
commit 5ba9716e12
155 changed files with 2883 additions and 551 deletions
@@ -51,6 +51,17 @@ class PlatformAuditLogControllerContractTest {
verifyNoInteractions(service);
}
@Test
void platformApplicationWithCustomerTenantCannotReadLogs() {
AuthenticatedUser malformed = new AuthenticatedUser(7L, 10001L, 10001L, 1L,
"异常平台账号", "PLATFORM", "WEB", Set.of("platform:audit:list"));
assertThatThrownBy(() -> controller.page(malformed, 1, 20, null, null, null, null,
null, null, null, null, null)).isInstanceOf(BizException.class)
.hasMessage("仅平台端可查看操作日志");
verifyNoInteractions(service);
}
@Test
void platformCanReadLogDetail() {
AuditLogResponses.Detail detail = new AuditLogResponses.Detail(8L, "audit-1", "ROLE_UPDATE", "ROLE", "9", null,