fix(firstleg): permit platform public port schedule scope
This commit is contained in:
+2
-3
@@ -42,7 +42,6 @@ public class PlatformPortScheduleController {
|
||||
public ApiResponse<PageResult<ScheduleView>> page(@AuthenticationPrincipal AuthenticatedUser user,
|
||||
@Valid Query query) {
|
||||
FirstlegScopeGuard.platform(user);
|
||||
if (query.customerId() != null) FirstlegScopeGuard.platform(user, query.customerId());
|
||||
return ApiResponse.success(service.page(query));
|
||||
}
|
||||
|
||||
@@ -69,7 +68,7 @@ public class PlatformPortScheduleController {
|
||||
public ApiResponse<Detail> create(@AuthenticationPrincipal AuthenticatedUser user,
|
||||
@RequestHeader("Idempotency-Key") String key,
|
||||
@Valid @RequestBody CreateRequest request) {
|
||||
FirstlegScopeGuard.platform(user, request.data().customerId());
|
||||
FirstlegScopeGuard.platform(user);
|
||||
return ApiResponse.success(service.create(user.userId(), user.username(), key, request));
|
||||
}
|
||||
|
||||
@@ -81,7 +80,7 @@ public class PlatformPortScheduleController {
|
||||
@PathVariable @Positive long portScheduleId,
|
||||
@RequestHeader("Idempotency-Key") String key,
|
||||
@Valid @RequestBody UpdateRequest request) {
|
||||
FirstlegScopeGuard.platform(user, request.data().customerId());
|
||||
FirstlegScopeGuard.platform(user);
|
||||
return ApiResponse.success(service.update(portScheduleId, user.userId(), user.username(), key, request));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user