From 1d3304e0804daecd6cbf3cecf0f6926fcb1a4be4 Mon Sep 17 00:00:00 2001 From: gyl <1554863190@qq.com> Date: Thu, 26 Mar 2026 14:58:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../defaults/webflux/WebFluxPermissionController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxPermissionController.java b/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxPermissionController.java index cbc6d5fb3..702e1b0c3 100644 --- a/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxPermissionController.java +++ b/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxPermissionController.java @@ -59,8 +59,8 @@ public Mono changePermissionState(@PathVariable @Parameter(description } @GetMapping("/_query/for-grant") - @ResourceAction(id = "grant", name = "赋权") - @QueryNoPagingOperation(summary = "获取用于赋权的权限列表") + @Authorize(ignore = true) + @QueryNoPagingOperation(summary = "获取当前用户用于赋权的权限列表") public Flux queryForGrant(QueryParamEntity query) { return Authentication .currentReactive() From 435ec62fe51e07c54d9acd2d786b2f145fccf802 Mon Sep 17 00:00:00 2001 From: gyl <1554863190@qq.com> Date: Thu, 26 Mar 2026 15:00:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../defaults/webflux/WebFluxPermissionController.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxPermissionController.java b/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxPermissionController.java index 702e1b0c3..9a4cf88a0 100644 --- a/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxPermissionController.java +++ b/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/webflux/WebFluxPermissionController.java @@ -10,6 +10,7 @@ import org.hswebframework.web.api.crud.entity.QueryParamEntity; import org.hswebframework.web.authorization.Authentication; import org.hswebframework.web.authorization.annotation.*; +import org.hswebframework.web.authorization.exception.UnAuthorizedException; import org.hswebframework.web.crud.service.ReactiveCrudService; import org.hswebframework.web.crud.web.reactive.ReactiveServiceCrudController; import org.hswebframework.web.system.authorization.api.entity.PermissionEntity; @@ -64,6 +65,7 @@ public Mono changePermissionState(@PathVariable @Parameter(description public Flux queryForGrant(QueryParamEntity query) { return Authentication .currentReactive() + .switchIfEmpty(Mono.error(UnAuthorizedException::new)) .flatMapMany(auth -> permissionProperties .getFilter() .doFilter(permissionService.query(query.noPaging()), auth));