fix overseas return inventory flow
This commit is contained in:
@@ -24,7 +24,7 @@ import java.util.stream.Collectors;
|
||||
public class SecurityEventOutboxService {
|
||||
private static final List<String> OVERSEAS_AUTHORITY_PREFIXES = List.of(
|
||||
"platform:overseas-warehouse:", "platform:overseas-business:",
|
||||
"platform:overseas-master-data:", "merchant:warehouse:",
|
||||
"platform:overseas-master-data:", "merchant:warehouse:", "merchant:overseas-warehouse:",
|
||||
"merchant:cross-border:", "platform:finance:", "lastleg:");
|
||||
@Resource private JdbcTemplate jdbc;
|
||||
@Resource private ObjectMapper objectMapper;
|
||||
|
||||
@@ -84,7 +84,7 @@ class SecurityEventOutboxServiceTest {
|
||||
.thenReturn(List.of("PLATFORM_ADMIN"));
|
||||
when(authorizationQueries.findPermissionsByIdentity(101L, 0L, "ADMIN"))
|
||||
.thenReturn(List.of("platform:overseas-warehouse:orders:view", "platform:iam:users:view",
|
||||
"lastleg:orders:view"));
|
||||
"merchant:overseas-warehouse:return-inventory:list", "lastleg:orders:view"));
|
||||
|
||||
service.permissionChanged(101L, 0L, "ADMIN", "ROLE_CHANGED");
|
||||
|
||||
@@ -96,7 +96,8 @@ class SecurityEventOutboxServiceTest {
|
||||
envelope.payload(), IamSecurityEventsV1.PermissionVersionChanged.class);
|
||||
assertThat(payload.roles()).containsExactly("PLATFORM_ADMIN");
|
||||
assertThat(payload.authorities()).containsExactlyInAnyOrder(
|
||||
"platform:overseas-warehouse:orders:view", "lastleg:orders:view");
|
||||
"platform:overseas-warehouse:orders:view",
|
||||
"merchant:overseas-warehouse:return-inventory:list", "lastleg:orders:view");
|
||||
assertThat(payload.authorities()).doesNotContain("platform:iam:users:view");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user