protected override void InternalValidate() { TaskLogger.LogEnter(); SharedConfigurationTaskHelper.VerifyIsNotTinyTenant(base.CurrentOrgState, new Task.ErrorLoggerDelegate(base.WriteError)); base.InternalValidate(); if (NewOrganizationRelationship.DomainsExist(this.DataObject.DomainNames, this.ConfigurationSession)) { base.WriteError(new DuplicateOrganizationRelationshipDomainException(base.FormatMultiValuedProperty(this.DataObject.DomainNames)), ErrorCategory.InvalidOperation, base.Name); } if (this.FreeBusyAccessScopeADGroup != null) { this.DataObject.FreeBusyAccessScope = this.FreeBusyAccessScopeADGroup.Id; } if (this.MailTipsAccessScopeADGroup != null) { this.DataObject.MailTipsAccessScope = this.MailTipsAccessScopeADGroup.Id; } TaskLogger.LogExit(); }
protected override void InternalValidate() { TaskLogger.LogEnter(); base.InternalValidate(); foreach (ADPropertyDefinition adpropertyDefinition in SetOrganizationRelationship.setProperties) { if (base.Fields.IsModified(adpropertyDefinition)) { this.DataObject[adpropertyDefinition] = base.Fields[adpropertyDefinition]; } } if (NewOrganizationRelationship.DomainsExist(this.DataObject.DomainNames, this.ConfigurationSession, new Guid?(this.DataObject.Guid))) { base.WriteError(new DuplicateOrganizationRelationshipDomainException(base.FormatMultiValuedProperty(this.DataObject.DomainNames)), ErrorCategory.InvalidOperation, this.Identity); } if (base.Fields.IsModified("FreeBusyAccessScope")) { if (this.FreeBusyAccessScope != null) { ADGroup adgroup = (ADGroup)base.GetDataObject <ADGroup>(this.FreeBusyAccessScope, base.TenantGlobalCatalogSession, null, new LocalizedString?(Strings.ErrorRecipientNotFound(this.FreeBusyAccessScope.ToString())), new LocalizedString?(Strings.ErrorRecipientNotUnique(this.FreeBusyAccessScope.ToString()))); this.DataObject.FreeBusyAccessScope = adgroup.Id; } else { this.DataObject.FreeBusyAccessScope = null; } } if (base.Fields.IsModified("MailTipsAccessScope")) { if (this.MailTipsAccessScope != null) { ADGroup adgroup2 = (ADGroup)base.GetDataObject <ADGroup>(this.MailTipsAccessScope, base.TenantGlobalCatalogSession, null, new LocalizedString?(Strings.ErrorRecipientNotFound(this.MailTipsAccessScope.ToString())), new LocalizedString?(Strings.ErrorRecipientNotUnique(this.MailTipsAccessScope.ToString()))); this.DataObject.MailTipsAccessScope = adgroup2.Id; } else { this.DataObject.MailTipsAccessScope = null; } } TaskLogger.LogExit(); }
internal static bool DomainsExist(MultiValuedProperty <SmtpDomain> domains, IConfigurationSession configurationSession) { return(NewOrganizationRelationship.DomainsExist(domains, configurationSession, null)); }