From ddb8dee34c54a57b0893a952c8ceb0bbf472d0fc Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期一, 07 三月 2022 22:13:44 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java index 57d9f6c..dee86d2 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java @@ -204,10 +204,13 @@ } if (currentUserRoles.isEmpty()) { checkResult = false; - } - boolean result = sysAllowedRoles.stream().anyMatch(role -> currentUserRoles.contains(role)); - if (!result) { - checkResult = false; + } else { + if (!sysAllowedRoles.contains("1")) { + boolean result = sysAllowedRoles.stream().anyMatch(role -> currentUserRoles.contains(role)); + if (!result) { + checkResult = false; + } + } } } } -- Gitblit v1.7.1