AshScim.Checks.AshScimInteraction (ash_scim v0.1.0)

Copy Markdown View Source

Returns true when the changeset/query has context.private.ash_scim? set, which AshScim.Router does for every internal Ash call.

Add a bypass for this check on any resource exposed via SCIM so the router's internal queries (read, get, create, update, destroy, load, bulk_destroy) aren't blocked by your application's user-facing policies:

policies do
  bypass AshScim.Checks.AshScimInteraction do
    authorize_if always()
  end

  # ...your normal policies...
end

This mirrors the AshAuthentication.Checks.AshAuthenticationInteraction pattern and serves the same purpose: keep user-facing policies in charge of user-facing actions, while letting the extension's plumbing run unimpeded.

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.