Skip to content

Commit

Permalink
#1337: Make super admin have admin rights.
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonpoo committed Dec 6, 2024
1 parent 2b84758 commit f06eb34
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 f06eb34

Please sign in to comment.