This commit is contained in:
2026-08-13 12:22:31 +08:00
parent 16dc03a2e2
commit e742abd1cf
49 changed files with 821 additions and 50 deletions
@@ -102,7 +102,7 @@ public class PlatformQualificationFileController {
}
@GetMapping("/{tenantId}/{fileName}")
@PreAuthorize("hasAnyAuthority('platform:customer:list','platform:customer:view')")
@PreAuthorize("hasAuthority('platform:customer:list')")
public ResponseEntity<org.springframework.core.io.Resource> download(
@AuthenticationPrincipal AuthenticatedUser user,
@PathVariable long tenantId, @PathVariable String fileName) {
@@ -82,11 +82,11 @@ class QualificationFileContractTest {
}
@Test
void platformQualificationPreviewUsesTheCustomerViewPermission() throws Exception {
void platformQualificationPreviewUsesTheCustomerListPermission() throws Exception {
var method = PlatformQualificationFileController.class.getDeclaredMethod(
"download", AuthenticatedUser.class, long.class, String.class);
assertEquals("hasAuthority('platform:customer:view')", method.getAnnotation(PreAuthorize.class).value());
assertEquals("hasAuthority('platform:customer:list')", method.getAnnotation(PreAuthorize.class).value());
}
@Test