# `MishkaCmsCore.Runtime.Resources.Validations.ActsOnRecordSite`
[🔗](https://github.com/mishka-group/mishka_cms_core/blob/v0.0.1/lib/mishka_cms_core/runtime/resources/__validations/acts_on_record_site.ex#L5)

Refuses a write by a caller that does not act on the site the record belongs to.

A missing tenant is not a master, and neither is anything that is not a site user. Without a
tenant, only a master (a record's `site_id` nil) or the system (`authorize?: false`) passes; with
one, whoever acts on that site passes, for that site's records alone. The rule is
`MishkaCmsCore.Runtime.Resources.Preparations.SiteWithGlobals.acts_on?/2`, asked of the row's
CURRENT `site_id`.

## Options

- `:message` - Required. The message for a caller that does not act on the record's site.

## Usage

    validate {MishkaCmsCore.Runtime.Resources.Validations.ActsOnRecordSite,
              message: dgettext_noop("errors", "Cannot restore version of layout from another site.")}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
