using System.Linq.Expressions; using AIStudio.Settings.DataModel; namespace AIStudio.Settings; public sealed class DataSourceSecuritySettings(Expression>? configSelection = null) { /// /// The default constructor for the JSON deserializer. /// public DataSourceSecuritySettings() : this(null) { } /// /// Provider instance IDs trusted by an organization for data-source security checks. /// public HashSet TrustedProviderIds { get; set; } = ManagedConfiguration.Register(configSelection, n => n.TrustedProviderIds, []); /// /// The least strict outbound data restriction a data source may have. /// /// /// Only an organization sets it; the default leaves every level to the user. A data source set to /// a less strict level gets this one when its passages reach a chat, see /// DataSourceOutboundDataExtensions.GetEffectiveOutboundDataRestriction, and its dialog no longer /// offers the less strict levels. /// public OutboundDataRestriction MinimumOutboundDataRestriction { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumOutboundDataRestriction, OutboundDataRestriction.UNRESTRICTED); }