Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix resource annotation in V3.0 controller #13068

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public Result<String> partialUpdateInstance(InstanceForm instanceForm) throws Ex
@GetMapping("/list")
@TpsControl(pointName = "NamingServiceSubscribe", name = "HttpNamingServiceSubscribe")
@ExtractorManager.Extractor(httpExtractor = NamingInstanceListHttpParamExtractor.class)
@Secured(resource = UtilsAndCommons.SERVICE_CONTROLLER_V3_ADMIN_PATH, action = ActionTypes.READ, apiType = ApiType.ADMIN_API)
@Secured(resource = UtilsAndCommons.INSTANCE_CONTROLLER_V3_ADMIN_PATH, action = ActionTypes.READ, apiType = ApiType.ADMIN_API)
public Result<ServiceInfo> list(InstanceListForm instanceListForm) throws NacosApiException {
instanceListForm.validate();
String compositeServiceName = NamingUtils.getGroupedName(instanceListForm.getServiceName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public OperatorControllerV3(Operator operatorV2Impl) {
* Get switch information.
*/
@GetMapping("/switches")
@Secured(resource = UtilsAndCommons.INSTANCE_CONTROLLER_V3_ADMIN_PATH, action = ActionTypes.READ, apiType = ApiType.ADMIN_API)
@Secured(resource = UtilsAndCommons.OPERATOR_CONTROLLER_V3_ADMIN_PATH, action = ActionTypes.READ, apiType = ApiType.ADMIN_API)
public Result<SwitchDomain> switches() {
return Result.success(operatorV2Impl.switches());
}
Expand All @@ -67,7 +67,7 @@ public Result<SwitchDomain> switches() {
* Update switch information.
*/
@PutMapping("/switches")
@Secured(resource = UtilsAndCommons.INSTANCE_CONTROLLER_V3_ADMIN_PATH, action = ActionTypes.WRITE, apiType = ApiType.ADMIN_API)
@Secured(resource = UtilsAndCommons.OPERATOR_CONTROLLER_V3_ADMIN_PATH, action = ActionTypes.WRITE, apiType = ApiType.ADMIN_API)
public Result<String> updateSwitch(UpdateSwitchForm updateSwitchForm) throws Exception {
updateSwitchForm.validate();
try {
Expand Down