From f06eb34e34967fd8b4f86b48c7bbbcd9d09c46c6 Mon Sep 17 00:00:00 2001 From: Thomasr Date: Fri, 6 Dec 2024 09:52:36 -0500 Subject: [PATCH] #1337: Make super admin have admin rights. --- .../java/org/lowcoder/api/usermanagement/OrgApiServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/usermanagement/OrgApiServiceImpl.java b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/usermanagement/OrgApiServiceImpl.java index 1b1036c24..e155f75da 100644 --- a/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/usermanagement/OrgApiServiceImpl.java +++ b/server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/usermanagement/OrgApiServiceImpl.java @@ -161,7 +161,7 @@ public Mono updateRoleForMember(String orgId, UpdateRoleRequest updateR private Mono checkVisitorAdminRole(String orgId) { return sessionUserService.getVisitorId() .flatMap(visitor -> orgMemberService.getOrgMember(orgId, visitor)) - .filter(it -> it.getRole() == MemberRole.ADMIN) + .filter(it -> it.getRole() == MemberRole.ADMIN || it.getRole() == MemberRole.SUPER_ADMIN) .switchIfEmpty(deferredError(BizError.NOT_AUTHORIZED, "NOT_AUTHORIZED")); }