public async Task Validate(IValidationContext context)
        {
            //if optional postmovetag is not specified, then we need only read permissions to the source account
            //else if postmovetag is specified in the config file, then we will need write permissions to the source account
            if (String.IsNullOrEmpty(context.Config.SourcePostMoveTag))
            {
                Logger.LogInformation(LogDestination.File, "Checking read permissions on the source project");

                await ValidationHelpers.CheckConnection(context.SourceClient, context.Config.SourceConnection.Project, ValidationHelpers.ReadPermission);
            }
            else
            {
                Logger.LogInformation(LogDestination.File, "source-post-move-tag is specified, checking write permissions on the source project");

                await ValidationHelpers.CheckConnection(context.SourceClient, context.Config.SourceConnection.Project, ValidationHelpers.WritePermission);

                await ValidationHelpers.CheckIdentity(context.SourceClient, context.Config.SourceConnection.Project);
            }
        }
Esempio n. 2
0
        public async Task Validate(IValidationContext context)
        {
            await ValidationHelpers.CheckConnection(context.TargetClient, context.Config.TargetConnection.Project, ValidationHelpers.WritePermission);

            await ValidationHelpers.CheckIdentity(context.TargetClient, context.Config.TargetConnection.Project);
        }