feat(system): 添加菜单、角色和用户相关操作的权限控制

- 在 MenuController、RoleController 和 UserController 中添加了 @PreAuthorize 注解
- 新增了对菜单编辑、角色编辑、用户导入和用户导出的权限控制
This commit is contained in:
Theo
2025-07-02 09:05:57 +08:00
parent 42e5499119
commit 9197065102
3 changed files with 8 additions and 6 deletions

View File

@@ -156,6 +156,7 @@ public class UserController {
@Operation(summary = "导入用户")
@PostMapping("/import")
@PreAuthorize("@ss.hasPerm('sys:user:import')")
@Log(value = "导入用户", module = LogModuleEnum.USER)
public Result<ExcelResult> importUsers(MultipartFile file) throws IOException {
UserImportListener listener = new UserImportListener();
@@ -165,6 +166,7 @@ public class UserController {
@Operation(summary = "导出用户")
@GetMapping("/export")
@PreAuthorize("@ss.hasPerm('sys:user:export')")
@Log(value = "导出用户", module = LogModuleEnum.USER)
public void exportUsers(UserPageQuery queryParams, HttpServletResponse response) throws IOException {
String fileName = "用户列表.xlsx";