pub trait PolicyFilter: Policy {
// Provided method
fn filter<'a>(
&self,
policies: &'a [PolicyView],
organization_user_policy_contexts: &[OrganizationUserPolicyContext],
) -> Vec<&'a PolicyView> { ... }
}Expand description
Provided Methods§
Sourcefn filter<'a>(
&self,
policies: &'a [PolicyView],
organization_user_policy_contexts: &[OrganizationUserPolicyContext],
) -> Vec<&'a PolicyView>
fn filter<'a>( &self, policies: &'a [PolicyView], organization_user_policy_contexts: &[OrganizationUserPolicyContext], ) -> Vec<&'a PolicyView>
Filters policies to those that should be enforced against the user.
This evaluates common business rules (e.g. the policy is enabled),
as well as policy-specific rules according to its Policy.
If a policy’s organization is not present in organization_user_policy_contexts, the policy
is enforced by default.