#nullable enable using Bit.Core.AdminConsole.OrganizationFeatures.Policies.PolicyRequirements; namespace Bit.Core.AdminConsole.OrganizationFeatures.Policies; public interface IPolicyRequirementQuery { /// /// Get a policy requirement for a specific user. /// The policy requirement represents how one or more policy types should be enforced against the user. /// It will always return a value even if there are no policies that should be enforced. /// This should be used for all policy checks. /// /// The user that you need to enforce the policy against. /// The IPolicyRequirement that corresponds to the policy you want to enforce. Task GetAsync(Guid userId) where T : IPolicyRequirement; /// /// Get all organization user IDs within an organization that are affected by a given policy type. /// Respects role/status/provider exemptions via the policy factory's Enforce predicate. /// /// The organization to check. /// The IPolicyRequirement that corresponds to the policy type to evaluate. /// Organization user IDs for whom the policy applies within the organization. Task> GetManyByOrganizationIdAsync(Guid organizationId) where T : IPolicyRequirement; }