diff --git a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java index 820e7d19983..d72b8bd8ce2 100644 --- a/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java +++ b/apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/PermissionController.java @@ -259,7 +259,7 @@ public ResponseEntity assignClusterNamespaceRoleToUser(@PathVariable Strin } @PreAuthorize(value = "@permissionValidator.hasAssignRolePermission(#appId)") - @DeleteMapping("/apps/{appId}/envs/{env}/clusters/{clusterName}/ns _roles/{roleType}") + @DeleteMapping("/apps/{appId}/envs/{env}/clusters/{clusterName}/ns_roles/{roleType}") public ResponseEntity removeClusterNamespaceRoleFromUser(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName, @PathVariable String roleType, @RequestParam String user) { RequestPrecondition.checkArgumentsNotEmpty(user); diff --git a/apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/controller/PermissionControllerTest.java b/apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/controller/PermissionControllerTest.java index 6e953923687..8785ef60cec 100644 --- a/apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/controller/PermissionControllerTest.java +++ b/apollo-portal/src/test/java/com/ctrip/framework/apollo/portal/controller/PermissionControllerTest.java @@ -76,7 +76,7 @@ public void testClusterNamespaceRoleLifeCycle() { // check role assigned ResponseEntity afterAssign = restTemplate.getForEntity( - url("/apps/{appId}/envs/{env}/clusters/{clusterName}/role_users"), + url("/apps/{appId}/envs/{env}/clusters/{clusterName}/ns_role_users"), ClusterNamespaceRolesAssignedUsers.class, appId, env, clusterName); assertEquals(200, afterAssign.getStatusCodeValue()); body = afterAssign.getBody();