A policy check: the actor may open the builder the row's own section names — its runtime area or
admin:dashboard:code (MishkaCmsCore.Runtime.PageBuilder.Section.permissions/1).
Snippets, review notes and builder history each carry the section they were written in, so the names they need are read off the row:
policies do
policy action_type([:create, :read, :update, :destroy]) do
authorize_if {MishkaCmsCore.Runtime.PageBuilder.BuilderAccess, field: :section}
end
endA create is decided by the section it writes; a read, update or destroy reaches the rows whose
section the actor holds. The site scope of MishkaCmsCore.Accounts.Checks.AccessPermissions
applies: a site user holds nothing under another site's tenant.
Options
:field— the attribute holding the section (:page,:layout,:component,:error_page). Required.
Summary
Functions
Callback implementation for Ash.Policy.Check.auto_filter/3.
Callback implementation for Ash.Policy.Check.check/4.
Callback implementation for Ash.Policy.Check.eager_evaluate?/0.
Callback implementation for Ash.Policy.Check.expand_description/3.
Callback implementation for Ash.Policy.Check.init/1.
Callback implementation for Ash.Policy.Check.prefer_expanded_description?/0.
Callback implementation for Ash.Policy.FilterCheck.reject/3.
Callback implementation for Ash.Policy.Check.requires_original_data?/2.
The sections whose builder actor may open, as the atoms the builder's rows store.
Callback implementation for Ash.Policy.Check.strict_check/3.
Callback implementation for Ash.Policy.Check.type/0.
Functions
Callback implementation for Ash.Policy.Check.auto_filter/3.
Callback implementation for Ash.Policy.Check.check/4.
Callback implementation for Ash.Policy.Check.eager_evaluate?/0.
Callback implementation for Ash.Policy.Check.expand_description/3.
Callback implementation for Ash.Policy.Check.init/1.
Callback implementation for Ash.Policy.Check.prefer_expanded_description?/0.
Callback implementation for Ash.Policy.FilterCheck.reject/3.
Callback implementation for Ash.Policy.Check.requires_original_data?/2.
The sections whose builder actor may open, as the atoms the builder's rows store.
Callback implementation for Ash.Policy.Check.strict_check/3.
Callback implementation for Ash.Policy.Check.type/0.