From 07b4856febb18d7237196bba3631164672186b96 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Tue, 4 Nov 2025 16:25:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=AE=A1=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/app/service/user/user/UserIdentityServiceImpl.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/user/UserIdentityServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/user/UserIdentityServiceImpl.java index 1bec9e15..5c84e4ac 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/user/UserIdentityServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/user/UserIdentityServiceImpl.java @@ -41,9 +41,7 @@ public class UserIdentityServiceImpl implements UserIdentityService { teamProfileClient.getByMemberId(userId)); Administrator administrator = administratorService.getByUserId(userId); - boolean isAdmin = Optional.ofNullable(administrator) - .map(e -> RoomRolesEnum.ADMIN.eq(e.getRoles())) - .orElse(Boolean.FALSE); + boolean isAdmin = Optional.of(administrator!= null).orElse(Boolean.FALSE); boolean isSuperAdmin = Optional.ofNullable(administrator) .map(e -> RoomRolesEnum.SUPER_ADMIN.eq(e.getRoles())) .orElse(Boolean.FALSE);