internal static PolicyConfiguration CreatePolicyConfigurationFromOwaMailboxPolicy(OwaMailboxPolicy owaMailboxPolicy) { if (owaMailboxPolicy == null) { return(null); } PolicyConfiguration policyConfiguration = new PolicyConfiguration(); AttachmentPolicyLevel treatUnknownTypeAs = ConfigurationBase.AttachmentActionToPolicyLevel(new AttachmentBlockingActions?(owaMailboxPolicy.ActionForUnknownFileAndMIMETypes)); AttachmentPolicy attachmentPolicy = new AttachmentPolicy(owaMailboxPolicy.BlockedFileTypes.ToArray(), owaMailboxPolicy.BlockedMimeTypes.ToArray(), owaMailboxPolicy.ForceSaveFileTypes.ToArray(), owaMailboxPolicy.ForceSaveMimeTypes.ToArray(), owaMailboxPolicy.AllowedFileTypes.ToArray(), owaMailboxPolicy.AllowedMimeTypes.ToArray(), treatUnknownTypeAs, owaMailboxPolicy.DirectFileAccessOnPublicComputersEnabled, owaMailboxPolicy.DirectFileAccessOnPrivateComputersEnabled, owaMailboxPolicy.ForceWacViewingFirstOnPublicComputers, owaMailboxPolicy.ForceWacViewingFirstOnPrivateComputers, owaMailboxPolicy.WacViewingOnPublicComputersEnabled, owaMailboxPolicy.WacViewingOnPrivateComputersEnabled, owaMailboxPolicy.ForceWebReadyDocumentViewingFirstOnPublicComputers, owaMailboxPolicy.ForceWebReadyDocumentViewingFirstOnPrivateComputers, owaMailboxPolicy.WebReadyDocumentViewingOnPublicComputersEnabled, owaMailboxPolicy.WebReadyDocumentViewingOnPrivateComputersEnabled, owaMailboxPolicy.WebReadyFileTypes.ToArray(), owaMailboxPolicy.WebReadyMimeTypes.ToArray(), owaMailboxPolicy.WebReadyDocumentViewingSupportedFileTypes.ToArray(), owaMailboxPolicy.WebReadyDocumentViewingSupportedMimeTypes.ToArray(), owaMailboxPolicy.WebReadyDocumentViewingForAllSupportedTypes); policyConfiguration.AttachmentPolicy = attachmentPolicy; int segmentationBits = (int)owaMailboxPolicy[OwaMailboxPolicySchema.ADMailboxFolderSet]; int segmentationBits2 = (int)owaMailboxPolicy[OwaMailboxPolicySchema.ADMailboxFolderSet2]; policyConfiguration.SegmentationFlags = ConfigurationBase.SetSegmentationFlags(segmentationBits, segmentationBits2); policyConfiguration.OutboundCharset = owaMailboxPolicy.OutboundCharset; policyConfiguration.UseGB18030 = owaMailboxPolicy.UseGB18030; policyConfiguration.UseISO885915 = owaMailboxPolicy.UseISO885915; policyConfiguration.InstantMessagingType = ((owaMailboxPolicy.InstantMessagingType != null) ? owaMailboxPolicy.InstantMessagingType.Value : InstantMessagingTypeOptions.None); policyConfiguration.DefaultTheme = owaMailboxPolicy.DefaultTheme; policyConfiguration.PlacesEnabled = owaMailboxPolicy.PlacesEnabled; policyConfiguration.WeatherEnabled = owaMailboxPolicy.WeatherEnabled; policyConfiguration.AllowCopyContactsToDeviceAddressBook = owaMailboxPolicy.AllowCopyContactsToDeviceAddressBook; policyConfiguration.AllowOfflineOn = owaMailboxPolicy.AllowOfflineOn; policyConfiguration.RecoverDeletedItemsEnabled = owaMailboxPolicy.RecoverDeletedItemsEnabled; policyConfiguration.GroupCreationEnabled = owaMailboxPolicy.GroupCreationEnabled; return(policyConfiguration); }
// Token: 0x0600095A RID: 2394 RVA: 0x0001FACC File Offset: 0x0001DCCC private VdirConfiguration(ITopologyConfigurationSession session, ADOwaVirtualDirectory owaVirtualDirectory) { AttachmentPolicyLevel treatUnknownTypeAs = ConfigurationBase.AttachmentActionToPolicyLevel(owaVirtualDirectory.ActionForUnknownFileAndMIMETypes); AttachmentPolicy attachmentPolicy = new AttachmentPolicy(owaVirtualDirectory.BlockedFileTypes.ToArray(), owaVirtualDirectory.BlockedMimeTypes.ToArray(), owaVirtualDirectory.ForceSaveFileTypes.ToArray(), owaVirtualDirectory.ForceSaveMimeTypes.ToArray(), owaVirtualDirectory.AllowedFileTypes.ToArray(), owaVirtualDirectory.AllowedMimeTypes.ToArray(), treatUnknownTypeAs, owaVirtualDirectory.DirectFileAccessOnPublicComputersEnabled.Value, owaVirtualDirectory.DirectFileAccessOnPrivateComputersEnabled.Value, owaVirtualDirectory.ForceWacViewingFirstOnPublicComputers.Value, owaVirtualDirectory.ForceWacViewingFirstOnPrivateComputers.Value, owaVirtualDirectory.WacViewingOnPublicComputersEnabled.Value, owaVirtualDirectory.WacViewingOnPrivateComputersEnabled.Value, owaVirtualDirectory.ForceWebReadyDocumentViewingFirstOnPublicComputers.Value, owaVirtualDirectory.ForceWebReadyDocumentViewingFirstOnPrivateComputers.Value, owaVirtualDirectory.WebReadyDocumentViewingOnPublicComputersEnabled.Value, owaVirtualDirectory.WebReadyDocumentViewingOnPrivateComputersEnabled.Value, owaVirtualDirectory.WebReadyFileTypes.ToArray(), owaVirtualDirectory.WebReadyMimeTypes.ToArray(), owaVirtualDirectory.WebReadyDocumentViewingSupportedFileTypes.ToArray(), owaVirtualDirectory.WebReadyDocumentViewingSupportedMimeTypes.ToArray(), owaVirtualDirectory.WebReadyDocumentViewingForAllSupportedTypes.Value); this.formsAuthenticationEnabled = owaVirtualDirectory.InternalAuthenticationMethods.Contains(AuthenticationMethod.Fba); this.windowsAuthenticationEnabled = owaVirtualDirectory.InternalAuthenticationMethods.Contains(AuthenticationMethod.WindowsIntegrated); this.basicAuthenticationEnabled = owaVirtualDirectory.InternalAuthenticationMethods.Contains(AuthenticationMethod.Basic); this.digestAuthenticationEnabled = owaVirtualDirectory.InternalAuthenticationMethods.Contains(AuthenticationMethod.Digest); base.AttachmentPolicy = attachmentPolicy; this.filterWebBeaconsAndHtmlForms = VdirConfiguration.GetWebBeaconFilterLevel(owaVirtualDirectory.FilterWebBeaconsAndHtmlForms); base.DefaultTheme = owaVirtualDirectory.DefaultTheme; int segmentationBits = (int)owaVirtualDirectory[ADOwaVirtualDirectorySchema.ADMailboxFolderSet]; int segmentationBits2 = (int)owaVirtualDirectory[ADOwaVirtualDirectorySchema.ADMailboxFolderSet2]; base.SegmentationFlags = ConfigurationBase.SetSegmentationFlags(segmentationBits, segmentationBits2); if (owaVirtualDirectory.OutboundCharset != null) { base.OutboundCharset = owaVirtualDirectory.OutboundCharset.Value; } if (owaVirtualDirectory.UseGB18030 != null && owaVirtualDirectory.UseGB18030.Value) { base.UseGB18030 = true; } else { base.UseGB18030 = false; } if (owaVirtualDirectory.UseISO885915 != null && owaVirtualDirectory.UseISO885915.Value) { base.UseISO885915 = true; } else { base.UseISO885915 = false; } base.InstantMessagingEnabled = (owaVirtualDirectory.InstantMessagingEnabled ?? false); base.InstantMessagingType = (owaVirtualDirectory.InstantMessagingType ?? InstantMessagingTypeOptions.None); base.InstantMessagingEnabled &= (base.InstantMessagingType == InstantMessagingTypeOptions.Ocs); if (VariantConfiguration.GetSnapshot(MachineSettingsContext.Local, null, null).OwaDeployment.UseVdirConfigForInstantMessaging.Enabled) { this.instantMessagingServerName = owaVirtualDirectory.InstantMessagingServerName; this.instantMessagingCertificateThumbprint = owaVirtualDirectory.InstantMessagingCertificateThumbprint; if (string.IsNullOrWhiteSpace(this.instantMessagingServerName)) { Organization orgContainer = session.GetOrgContainer(); ProtocolConnectionSettings sipaccessService = orgContainer.SIPAccessService; if (sipaccessService == null) { this.instantMessagingServerName = string.Empty; } else { this.instantMessagingServerName = sipaccessService.Hostname.ToString(); } } } base.AllowOfflineOn = owaVirtualDirectory.AllowOfflineOn; base.PlacesEnabled = (owaVirtualDirectory.PlacesEnabled != null && owaVirtualDirectory.PlacesEnabled.Value); base.WeatherEnabled = (owaVirtualDirectory.WeatherEnabled != null && owaVirtualDirectory.WeatherEnabled.Value); base.AllowCopyContactsToDeviceAddressBook = (owaVirtualDirectory.AllowCopyContactsToDeviceAddressBook != null && owaVirtualDirectory.AllowCopyContactsToDeviceAddressBook.Value); base.RecoverDeletedItemsEnabled = (owaVirtualDirectory.RecoverDeletedItemsEnabled != null && owaVirtualDirectory.RecoverDeletedItemsEnabled.Value); this.expirationTime = DateTime.UtcNow + VdirConfiguration.expirationPeriod; }