MishkaCmsCore.Runtime.Resources.Checks.SettingPermission (Mishka CMS Core v0.0.1)

Copy Markdown View Source

Whether the actor holds what writing a setting takes: the :permission its definition declares, or admin:dashboard:setting when it declares none or no definition names the key (MishkaCmsCore.Settings.write_permission/1). Asked of the row's key, within the actor's own site as every MishkaCmsCore.Accounts.Checks.AccessPermissions check is.

policy action_type([:create, :update, :destroy]) do
  authorize_if MishkaCmsCore.Runtime.Resources.Checks.SettingPermission
end

Summary

Functions

eager_evaluate?()

Callback implementation for Ash.Policy.Check.eager_evaluate?/0.

init(opts)

Callback implementation for Ash.Policy.Check.init/1.

prefer_expanded_description?()

Callback implementation for Ash.Policy.Check.prefer_expanded_description?/0.

requires_original_data?(_, _)

Callback implementation for Ash.Policy.Check.requires_original_data?/2.

strict_check(actor, context, opts)

Callback implementation for Ash.Policy.Check.strict_check/3.

type()

Callback implementation for Ash.Policy.Check.type/0.