fix: 修复 Bug #441 — 护士角色无权访问卫生机构列表
将租户Controller中4个只读端点的权限从 system:tenant:operate 降级为 system:tenant:list: - getTenantPage (下拉列表数据源) - getTenantDetail - getTenantUserPage - getUnbindTenantUserList 增删改操作保持 system:tenant:operate 不变。 同步更新 sys_menu 表:menu_id=2048 perms='system:tenant:list' Root cause: 护士角色进入门诊手术安排页时 onMounted 调用 /system/tenant/page,该接口要求 system:tenant:operate 权限,护士角色无此权限导致卫生机构下拉列表为空,后续所有查询均失败。
This commit is contained in:
@@ -25,7 +25,7 @@ public class SysTenantController extends BaseController {
|
|||||||
private ISysTenantService sysTenantService;
|
private ISysTenantService sysTenantService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户分页列表
|
* 查询租户分页列表(只读操作,不限制租户管理权限)
|
||||||
*
|
*
|
||||||
* @param tenantId 租户ID查询
|
* @param tenantId 租户ID查询
|
||||||
* @param tenantCode 租户编码模糊查询
|
* @param tenantCode 租户编码模糊查询
|
||||||
@@ -35,7 +35,7 @@ public class SysTenantController extends BaseController {
|
|||||||
* @param pageSize 每页多少条
|
* @param pageSize 每页多少条
|
||||||
* @return 租户分页列表
|
* @return 租户分页列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
@PreAuthorize("@ss.hasPermi('system:tenant:list')")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public R<IPage<SysTenant>> getTenantPage(@RequestParam(required = false) Integer tenantId,
|
public R<IPage<SysTenant>> getTenantPage(@RequestParam(required = false) Integer tenantId,
|
||||||
@RequestParam(required = false) String tenantCode, @RequestParam(required = false) String tenantName,
|
@RequestParam(required = false) String tenantCode, @RequestParam(required = false) String tenantName,
|
||||||
@@ -45,19 +45,19 @@ public class SysTenantController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户详情
|
* 查询租户详情(只读操作)
|
||||||
*
|
*
|
||||||
* @param tenantId 租户ID
|
* @param tenantId 租户ID
|
||||||
* @return 租户分页列表
|
* @return 租户分页列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
@PreAuthorize("@ss.hasPermi('system:tenant:list')")
|
||||||
@GetMapping("/{tenantId}")
|
@GetMapping("/{tenantId}")
|
||||||
public R<SysTenant> getTenantDetail(@PathVariable Integer tenantId) {
|
public R<SysTenant> getTenantDetail(@PathVariable Integer tenantId) {
|
||||||
return R.ok(sysTenantService.getById(tenantId));
|
return R.ok(sysTenantService.getById(tenantId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户所属用户分页列表
|
* 查询租户所属用户分页列表(只读操作)
|
||||||
*
|
*
|
||||||
* @param tenantId 租户ID查询
|
* @param tenantId 租户ID查询
|
||||||
* @param userName 用户昵称模糊查询
|
* @param userName 用户昵称模糊查询
|
||||||
@@ -67,7 +67,7 @@ public class SysTenantController extends BaseController {
|
|||||||
* @param pageSize 每页多少条
|
* @param pageSize 每页多少条
|
||||||
* @return 租户所属用户分页列表
|
* @return 租户所属用户分页列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
@PreAuthorize("@ss.hasPermi('system:tenant:list')")
|
||||||
@GetMapping("/user/page")
|
@GetMapping("/user/page")
|
||||||
public R<IPage<SysUser>> getTenantUserPage(@RequestParam(required = false) Integer tenantId,
|
public R<IPage<SysUser>> getTenantUserPage(@RequestParam(required = false) Integer tenantId,
|
||||||
@RequestParam(required = false) String userName, @RequestParam(required = false) String nickName,
|
@RequestParam(required = false) String userName, @RequestParam(required = false) String nickName,
|
||||||
@@ -141,14 +141,14 @@ public class SysTenantController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询租户未绑定的用户列表
|
* 查询租户未绑定的用户列表(只读操作)
|
||||||
*
|
*
|
||||||
* @param tenantId 租户ID
|
* @param tenantId 租户ID
|
||||||
* @param pageNum 当前页
|
* @param pageNum 当前页
|
||||||
* @param pageSize 每页多少条
|
* @param pageSize 每页多少条
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:tenant:operate')")
|
@PreAuthorize("@ss.hasPermi('system:tenant:list')")
|
||||||
@GetMapping("/{tenantId}/unbind-users")
|
@GetMapping("/{tenantId}/unbind-users")
|
||||||
public R<IPage<SysUser>> getUnbindTenantUserList(@PathVariable Integer tenantId,
|
public R<IPage<SysUser>> getUnbindTenantUserList(@PathVariable Integer tenantId,
|
||||||
@RequestParam(required = false) String userName, @RequestParam(required = false) String nickName,
|
@RequestParam(required = false) String userName, @RequestParam(required = false) String nickName,
|
||||||
|
|||||||
Reference in New Issue
Block a user