MishkaCmsMigration.Targets.Helpers.Read (Mishka CMS Migration v0.0.1)

Copy Markdown View Source

The records a query finds for a target's existing/2 (MishkaCmsMigration.Target), read as the admin running the job under the run's site and the CMS's own policies.

An admin the CMS does not let read them finds none, so the items are created, and the CMS then refuses or accepts each write as it does for any admin. Any other failure is raised.

Summary

Functions

The records query finds in the run's site, [] when the admin may not read them. Of context only its actor and site_id are read, so a check of the admin's own, such as what an item may be mapped to, hands just those.

Functions

call(query, context)

@spec call(
  Ash.Query.t() | Ash.Resource.t(),
  MishkaCmsMigration.Target.context() | %{actor: term(), site_id: term()}
) :: [struct()]

The records query finds in the run's site, [] when the admin may not read them. Of context only its actor and site_id are read, so a check of the admin's own, such as what an item may be mapped to, hands just those.