pub trait PolicyFilter: Policy {
// Provided method
fn filter<'a>(
&self,
policies: &'a [PolicyView],
organizations: &[ProfileOrganization],
) -> Vec<&'a PolicyView> { ... }
}Expand description
Provided Methods§
Sourcefn filter<'a>(
&self,
policies: &'a [PolicyView],
organizations: &[ProfileOrganization],
) -> Vec<&'a PolicyView>
fn filter<'a>( &self, policies: &'a [PolicyView], organizations: &[ProfileOrganization], ) -> 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 organizations, the policy is enforced by
default.