Permit.Resolver (permit v0.3.0)
View SourceBasic implementation of Permit.ResolverBase
behaviour. Resolves and checks authorization of records or lists of records based on provided loader functions and parameters.
For a resolver implementation using Ecto for fetching resources, see Permit.Ecto.Resolver
from the permit_ecto
library.
This module is to be considered a private API of the authorization framework. It should not be directly used by application code, but rather by wrappers providing integration with e.g. Plug or LiveView.
Summary
Functions
@spec authorize_and_preload_all!( Permit.Types.subject(), module(), Permit.Types.resource_module(), Permit.Types.action_group(), map() ) :: {:authorized, [struct()]} | :unauthorized | {:not_found, term()}
@spec authorize_and_preload_one!( Permit.Types.subject(), module(), Permit.Types.resource_module(), Permit.Types.action_group(), map() ) :: {:authorized, [struct()]} | :unauthorized
@spec authorized?( Permit.Types.subject(), module(), Permit.Types.object_or_resource_module(), Permit.Types.action_group() ) :: boolean()