Skip to content

Commit

Permalink
Fix resource annotation. (#13068)
Browse files Browse the repository at this point in the history
  • Loading branch information
KiteSoar authored Jan 24, 2025
1 parent 4f74655 commit f77c16c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit f77c16c

Please sign in to comment.