Skip to content

Commit

Permalink
feat(auth):
Browse files Browse the repository at this point in the history
fix unit test
  • Loading branch information
BlackBear2003 committed Jan 1, 2025
1 parent 0dc0292 commit 37c305d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public ResponseEntity<Void> 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<Void> removeClusterNamespaceRoleFromUser(@PathVariable String appId, @PathVariable String env, @PathVariable String clusterName,
@PathVariable String roleType, @RequestParam String user) {
RequestPrecondition.checkArgumentsNotEmpty(user);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void testClusterNamespaceRoleLifeCycle() {

// check role assigned
ResponseEntity<ClusterNamespaceRolesAssignedUsers> 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();
Expand Down

0 comments on commit 37c305d

Please sign in to comment.