This is an automated email from the ASF dual-hosted git repository. xiaoyu pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push: new 49f629857d [type:bugfix] fix namespace page admin error (#5798) 49f629857d is described below commit 49f629857d7736264b290ced0e8af0a715d5982d Author: aias00 <liuhon...@apache.org> AuthorDate: Thu Nov 21 10:14:49 2024 +0800 [type:bugfix] fix namespace page admin error (#5798) --- .../apache/shenyu/admin/service/impl/NamespaceServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/NamespaceServiceImpl.java b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/NamespaceServiceImpl.java index d77c8054c9..a828ba12bb 100644 --- a/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/NamespaceServiceImpl.java +++ b/shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/NamespaceServiceImpl.java @@ -110,7 +110,13 @@ public class NamespaceServiceImpl implements NamespaceService { @Override public CommonPager<NamespaceVO> listByPage(final NamespaceQuery namespaceQuery) { - List<String> namespaceIds = namespaceUserService.listNamespaceIdByUserId(SessionUtil.visitorId()); + List<String> namespaceIds; + if (SessionUtil.isAdmin()) { + List<NamespaceDO> allList = namespaceMapper.selectAll(); + namespaceIds = allList.stream().map(NamespaceDO::getNamespaceId).toList(); + } else { + namespaceIds = namespaceUserService.listNamespaceIdByUserId(SessionUtil.visitorId()); + } if (CollectionUtils.isEmpty(namespaceIds)) { return new CommonPager<>(); }