mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-04 19:47:22 +00:00
31 lines
1.3 KiB
C#
31 lines
1.3 KiB
C#
using System.Linq.Expressions;
|
|
|
|
using AIStudio.Settings.DataModel;
|
|
|
|
namespace AIStudio.Settings;
|
|
|
|
public sealed class DataSourceSecuritySettings(Expression<Func<Data, DataSourceSecuritySettings>>? configSelection = null)
|
|
{
|
|
/// <summary>
|
|
/// The default constructor for the JSON deserializer.
|
|
/// </summary>
|
|
public DataSourceSecuritySettings() : this(null)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Provider instance IDs trusted by an organization for data-source security checks.
|
|
/// </summary>
|
|
public HashSet<string> TrustedProviderIds { get; set; } = ManagedConfiguration.Register(configSelection, n => n.TrustedProviderIds, []);
|
|
|
|
/// <summary>
|
|
/// The least strict outbound data restriction a data source may have.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// 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.
|
|
/// </remarks>
|
|
public OutboundDataRestriction MinimumOutboundDataRestriction { get; set; } = ManagedConfiguration.Register(configSelection, n => n.MinimumOutboundDataRestriction, OutboundDataRestriction.UNRESTRICTED);
|
|
} |