protected override void InternalValidate() { TaskLogger.LogEnter(); base.InternalValidate(); SetADUserBase <TIdentity, TPublicObject> .ValidateUserParameters(this.DataObject, this.ConfigurationSession, RecipientTaskHelper.CreatePartitionOrRootOrgScopedGcSession(base.DomainController, this.DataObject.Id), new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.ErrorLoggerDelegate(base.WriteError), ExchangeErrorCategory.Client, this.ShouldCheckAcceptedDomains(), base.ProvisioningCache); if (this.DataObject.IsChanged(UserSchema.WindowsLiveID) && this.DataObject.WindowsLiveID != SmtpAddress.Empty) { if (this.ShouldCheckAcceptedDomains()) { RecipientTaskHelper.ValidateInAcceptedDomain(this.ConfigurationSession, this.DataObject.OrganizationId, this.DataObject.WindowsLiveID.Domain, new Task.ErrorLoggerDelegate(base.WriteError), base.ProvisioningCache); MailboxTaskHelper.IsLiveIdExists((IRecipientSession)base.DataSession, this.DataObject.WindowsLiveID, this.DataObject.NetID, new Task.ErrorLoggerDelegate(base.WriteError)); } this.DataObject.UserPrincipalName = this.DataObject.WindowsLiveID.ToString(); } if (this.DataObject.IsModified(UserSchema.CertificateSubject)) { NewLinkedUser.ValidateCertificateSubject(this.DataObject.CertificateSubject, OrganizationId.ForestWideOrgId.Equals(this.DataObject.OrganizationId) ? null : this.DataObject.OrganizationId.PartitionId, this.DataObject.Id, new Task.TaskErrorLoggingDelegate(base.WriteError)); } if (this.IsDisablingRemotePowerShell() && this.orgAdminHelper.ShouldPreventLastAdminRemoval(this, this.DataObject.OrganizationId) && this.orgAdminHelper.IsLastAdmin(this.DataObject)) { TIdentity identity = this.Identity; base.WriteError(new RecipientTaskException(Strings.ErrorCannotDisableRemotePowershelForLastDelegatingOrgAdmin(identity.ToString())), ErrorCategory.InvalidOperation, this.Identity); } TaskLogger.LogExit(); }
protected override void InternalValidate() { TaskLogger.LogEnter(); base.InternalValidate(); SetADUserBase <UserIdParameter, User> .ValidateUserParameters(this.DataObject, this.ConfigurationSession, RecipientTaskHelper.CreatePartitionOrRootOrgScopedGcSession(base.DomainController, this.DataObject.Id), new Task.TaskVerboseLoggingDelegate(base.WriteVerbose), new Task.ErrorLoggerDelegate(base.WriteError), ExchangeErrorCategory.Client, this.ShouldCheckAcceptedDomains(), base.ProvisioningCache); if (this.DataObject.IsModified(UserSchema.CertificateSubject)) { NewLinkedUser.ValidateCertificateSubject(this.DataObject.CertificateSubject, OrganizationId.ForestWideOrgId.Equals(this.DataObject.OrganizationId) ? null : this.DataObject.OrganizationId.PartitionId, this.DataObject.Id, new Task.TaskErrorLoggingDelegate(base.WriteError)); } TaskLogger.LogExit(); }