From bc419a49bd32054202566df83fbef0db11d095a8 Mon Sep 17 00:00:00 2001 From: Thomas Rittson Date: Mon, 7 Oct 2024 13:01:58 +1000 Subject: [PATCH] Tweak comments --- .../Policies/IPolicyDefinition.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/Core/AdminConsole/OrganizationFeatures/Policies/IPolicyDefinition.cs b/src/Core/AdminConsole/OrganizationFeatures/Policies/IPolicyDefinition.cs index 5b1229ff77..c3bbf6bfc5 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/Policies/IPolicyDefinition.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/Policies/IPolicyDefinition.cs @@ -5,22 +5,26 @@ using Bit.Core.AdminConsole.Enums; namespace Bit.Core.AdminConsole.OrganizationFeatures.Policies; +/// +/// Defines behavior and functionality for a given PolicyType. +/// public interface IPolicyDefinition { /// - /// The PolicyType that the strategy is responsible for handling. + /// The PolicyType that this definition relates to. /// public PolicyType Type { get; } /// /// PolicyTypes that must be enabled before this policy can be enabled, if any. + /// These dependencies will be checked when this policy is enabled and when any required policy is disabled. /// public IEnumerable RequiredPolicies => []; /// /// Validates a policy before saving it. - /// Basic interdependencies between policies are already handled by the definition. - /// Use this for additional or more complex validation, if any. + /// Do not use this for simple dependencies between different policies - see instead. + /// Implementation is optional; by default it will not perform any validation. /// /// The current policy, if any /// The modified policy to be saved @@ -28,8 +32,9 @@ public interface IPolicyDefinition public Task ValidateAsync(Policy? currentPolicy, Policy modifiedPolicy) => Task.FromResult(null); /// - /// Optionally performs side effects after a policy is validated but before it is saved. + /// Performs side effects after a policy is validated but before it is saved. /// For example, this can be used to remove non-compliant users from the organization. + /// Implementation is optional; by default it will not perform any side effects. /// /// The current policy, if any /// The modified policy to be saved