|
@@ -66,14 +66,14 @@ public class PermissionController {
|
|
|
@Operation(summary = "获得管理员拥有的角色编号列表")
|
|
|
@Parameter(name = "userId", description = "用户编号", required = true)
|
|
|
@GetMapping("/list-user-roles")
|
|
|
- @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role-sh')")
|
|
|
public CommonResult<Set<Long>> listAdminRoles(@RequestParam("userId") Long userId) {
|
|
|
return success(permissionService.getUserRoleIdListByUserId(userId));
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "赋予用户角色")
|
|
|
@PostMapping("/assign-user-role")
|
|
|
- @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role')")
|
|
|
+ @PreAuthorize("@ss.hasPermission('system:permission:assign-user-role-sh')")
|
|
|
public CommonResult<Boolean> assignUserRole(@Validated @RequestBody PermissionAssignUserRoleReqVO reqVO) {
|
|
|
permissionService.assignUserRole(reqVO.getUserId(), reqVO.getRoleIds());
|
|
|
return success(true);
|