diff --git a/tools/syn2mas/src/migrate.mts b/tools/syn2mas/src/migrate.mts index 2574622e0..8a9be2870 100644 --- a/tools/syn2mas/src/migrate.mts +++ b/tools/syn2mas/src/migrate.mts @@ -36,6 +36,7 @@ interface MigrationOptions { synapseConfigFile: string; masConfigFile: string; upstreamProviderMapping: string[]; + skipGuests?: boolean; dryRun?: boolean; help?: boolean; } @@ -79,6 +80,13 @@ export async function migrate(): Promise { description: "Mapping of upstream provider IDs to MAS provider IDs. Format: :", }, + skipGuests: { + type: Boolean, + optional: true, + defaultValue: false, + description: + "Skip and print warnings for any guests users found in Synapse, instead of aborting", + }, dryRun: { type: Boolean, optional: true, @@ -201,7 +209,11 @@ export async function migrate(): Promise { const executions: Execution[] = []; if (user.is_guest === 1) { - fatal(`Migration of guest users is not supported: ${user.name}`); + if (args.skipGuests) { + log.warn(`Skipping guest user ${user.name}`); + } else { + fatal(`Migration of guest users is not supported: ${user.name}`); + } } // users => users diff --git a/tools/syn2mas/src/types/MUser.d.ts b/tools/syn2mas/src/types/MUser.d.ts index 35824f288..2e2e0280f 100644 --- a/tools/syn2mas/src/types/MUser.d.ts +++ b/tools/syn2mas/src/types/MUser.d.ts @@ -4,8 +4,6 @@ // SPDX-License-Identifier: AGPL-3.0-only // Please see LICENSE in the repository root for full details. -import type { MUserEmail } from "./MUserEmail"; - import type { UUID } from "./index"; export interface MUser {