mirror of
https://github.com/bitwarden/server
synced 2026-02-12 14:33:49 +00:00
* Initial implementation of new policy query * Remove unused using * Adjusts method name to better match repository method * Correct namespace * Initial refactor of policy loading * Add xml doc, incorporate shim data model * Updates usages to reflect new shim model * Prune extranneous data from policy detail response model, format code * Fix broken test, delete inapplicable test * Adds test cases covering query * Adjust codebase to use new PolicyQueryçˆ * Format code * Fix incorrect mock on test * Fix formatting * Adjust method name * More naming adjustments * Add PolicyData constructor, update test usages * Rename PolicyData -> PolicyStatus * Remove unused using
18 lines
740 B
C#
18 lines
740 B
C#
using Bit.Core.AdminConsole.Enums;
|
|
using Bit.Core.AdminConsole.Models.Data.Organizations.Policies;
|
|
|
|
namespace Bit.Core.AdminConsole.OrganizationFeatures.Policies;
|
|
|
|
public interface IPolicyQuery
|
|
{
|
|
/// <summary>
|
|
/// Retrieves a summary view of an organization's usage of a policy specified by the <paramref name="policyType"/>.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// This query is the entrypoint for consumers interested in understanding how a particular <see cref="PolicyType"/>
|
|
/// has been applied to an organization; the resultant <see cref="PolicyStatus"/> is not indicative of explicit
|
|
/// policy configuration.
|
|
/// </remarks>
|
|
Task<PolicyStatus> RunAsync(Guid organizationId, PolicyType policyType);
|
|
}
|