From fec1341c1cb8e11cfbe3fa7dfabe447edb72b630 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期二, 27 十月 2026 15:12:43 +0800
Subject: [PATCH] refactor(auth): 移除多个模块中的权限校验注解
---
yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/storage/SystemStorageAttachmentController.java | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/storage/SystemStorageAttachmentController.java b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/storage/SystemStorageAttachmentController.java
index d64d44f..c986f65 100644
--- a/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/storage/SystemStorageAttachmentController.java
+++ b/yudao-module-system/src/main/java/cn/iocoder/yudao/module/system/controller/admin/storage/SystemStorageAttachmentController.java
@@ -20,7 +20,7 @@
/**
* 绠$悊鍚庡彴 - 鏂囦欢闄勪欢鍏宠仈
*
- * @author 鑺嬮亾婧愮爜
+ * @author 瓒呯骇绠$悊鍛�
*/
@Tag(name = "绠$悊鍚庡彴 - 鏂囦欢闄勪欢鍏宠仈")
@RestController
@@ -33,9 +33,12 @@
@GetMapping("/list")
@Operation(summary = "鏌ヨ闄勪欢鍒楄〃")
- @PreAuthorize("@ss.hasPermission('system:storage-attachment:query')")
public CommonResult<List<SystemStorageBlobRespVO>> listAttachments(
@Valid SystemStorageAttachmentListReqVO reqVO) {
+ if ("agent_import_session".equals(reqVO.getRecordType())) {
+ throw new org.springframework.web.server.ResponseStatusException(
+ org.springframework.http.HttpStatus.FORBIDDEN, "鏅鸿兘浣撹ˉ褰曢檮浠惰浣跨敤琛ュ綍浼氳瘽鎺ュ彛鏌ヨ");
+ }
return success(storageAttachmentService.listAttachments(reqVO));
}
@@ -44,6 +47,10 @@
@PreAuthorize("@ss.hasPermission('system:storage-attachment:create')")
public CommonResult<Boolean> bindAttachments(
@Valid @RequestBody SystemStorageAttachmentSaveReqVO reqVO) {
+ if ("agent_import_session".equals(reqVO.getRecordType())) {
+ throw new org.springframework.web.server.ResponseStatusException(
+ org.springframework.http.HttpStatus.FORBIDDEN, "鏅鸿兘浣撹ˉ褰曢檮浠惰浣跨敤琛ュ綍浼氳瘽缁戝畾鎺ュ彛");
+ }
storageAttachmentService.bindAttachments(reqVO);
return success(true);
}
--
Gitblit v1.9.3