Skip to main content

Module policy

Module policy 

Source
Expand description

Authorization policies.

Policies are used to determine whether a recipient is allowed to perform a specific action on a resource. The action is represented by a Permission and the resource is represented by a [Resource]. The Decision represents whether the action is allowed or denied for the given recipient.

Structs§

ConstantPolicy
Policy that always returns a constant decision.

Enums§

Decision
Decision made by a policy.
Permission
Permission that a policy can authorize.
Principal

Traits§

Policy
Policy for access control.
ProvidesPolicy

Functions§

filter_authorized
process_resources for a dyn-typed policy.
process_resources
Checks if the context has the given permission for each resource, and retains only those that receive an allow decision.