public Mono<UpdateResult> authAndUpdateAdminRoles(
            @NotNull Long requesterId,
            @NotEmpty Set<Long> roleIds,
            @Nullable @NoWhitespace @Size(
                    min = MIN_ROLE_NAME_LIMIT,
                    max = MAX_ROLE_NAME_LIMIT) String newName,
            @Nullable Set<AdminPermission> permissions,
            @Nullable Integer rank) {
        try {
            Validator.notEmpty(roleIds, "roleIds");
            Validator.noWhitespace(newName, "newName");
            Validator.length(newName, "newName", MIN_ROLE_NAME_LIMIT, MAX_ROLE_NAME_LIMIT);
        } catch (ResponseException e) {
            return Mono.error(e);
        }
        return checkIfAllowedToManageRoles(requesterId,
                roleIds,
                OperationResultPublisherPool.ACKNOWLEDGED_UPDATE_RESULT,
                () -> {
                    if (permissions == null) {
                        return updateAdminRole(roleIds, newName, null, rank);
                    }
                    return queryPermissions(requesterId)
                            .switchIfEmpty(adminService.errorRequesterNotExist())
                            .flatMap(requesterPermissions -> {
                                if (requesterPermissions.containsAll(permissions)) {
                                    return updateAdminRole(roleIds, newName, permissions, rank);
                                }
                                TreeSet<AdminPermission> missingPermissions =
                                        new TreeSet<>(permissions);
                                missingPermissions.removeAll(requesterPermissions);
                                return Mono.error(
                                        ResponseException.get(ResponseStatusCode.UNAUTHORIZED,
                                                "The requester does not have the permissions: "
                                                        + missingPermissions));
                            });
                });
    }
@param adminService is lazy because: AdminService -> AdminRoleService -> AdminService
turms-service/src/main/java/im/turms/service/domain/admin/service/AdminRoleService.java