From 7497760bdf50a447664ccc992255bfe0ad4bf232 Mon Sep 17 00:00:00 2001 From: AlexBob <5199840@qq.com> Date: Wed, 3 Jul 2024 10:51:20 +0800 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E4=BA=86=20TenantsController=20=E4=B8=AD=E7=9A=84=20@?= =?UTF-8?q?PreAuthorize=20=E6=B3=A8=E8=A7=A3=EF=BC=8C=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E4=BA=86=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boot/security/core/tenant/TenantsController.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/boot/platform/src/main/java/com/platform/boot/security/core/tenant/TenantsController.java b/boot/platform/src/main/java/com/platform/boot/security/core/tenant/TenantsController.java index d21bd00b..f05601df 100644 --- a/boot/platform/src/main/java/com/platform/boot/security/core/tenant/TenantsController.java +++ b/boot/platform/src/main/java/com/platform/boot/security/core/tenant/TenantsController.java @@ -5,7 +5,6 @@ import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.util.Assert; import org.springframework.web.bind.annotation.*; import reactor.core.publisher.Flux; @@ -22,25 +21,21 @@ public class TenantsController { private final TenantsService tenantsService; @GetMapping("search") - @PreAuthorize("hasRole(@contextUtils.RULE_ADMINISTRATORS)") public Flux search(TenantRequest request, Pageable pageable) { return this.tenantsService.search(request, pageable); } @GetMapping("page") - @PreAuthorize("hasRole(@contextUtils.RULE_ADMINISTRATORS)") public Mono> page(TenantRequest request, Pageable pageable) { return this.tenantsService.page(request, pageable); } @PostMapping("save") - @PreAuthorize("hasRole(@contextUtils.RULE_ADMINISTRATORS)") public Mono operate(@Valid @RequestBody TenantRequest request) { return this.tenantsService.operate(request); } @DeleteMapping("delete") - @PreAuthorize("hasRole(@contextUtils.RULE_ADMINISTRATORS)") public Mono delete(@Valid @RequestBody TenantRequest request) { Assert.notNull(request.getId(), "When deleting a Tenant, the ID must not be null"); return this.tenantsService.delete(request);