Skip to content

Commit

Permalink
Merge pull request #1382 from lowcoder-org/fix/superadmin
Browse files Browse the repository at this point in the history
#1337: Make super admin have admin rights.
  • Loading branch information
FalkWolsky authored Dec 7, 2024
2 parents 2b84758 + f06eb34 commit a55bd38
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public Mono<Boolean> updateRoleForMember(String orgId, UpdateRoleRequest updateR
private Mono<OrgMember> 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"));
}

Expand Down

0 comments on commit a55bd38

Please sign in to comment.