Esempio n. 1
0
        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.CheckReadPermission(context.SourceClient, context.Config.SourceConnection.Project);
            }
            else
            {
                Logger.LogInformation(LogDestination.File, "source-post-move-tag is specified, checking write permissions on the source project");
                await ValidationHelpers.CheckBypassRulesPermission(context.SourceClient, context.Config.SourceConnection.Project);
            }
        }
Esempio n. 2
0
 public async Task Validate(IValidationContext context)
 {
     await ValidationHelpers.CheckBypassRulesPermission(context.TargetClient, context.Config.TargetConnection.Project);
 }