MishkaCmsCore. Runtime. Resources. Validations. ActsOnRecordSite
(Mishka CMS Core v0.0.1)
Copy Markdown
View Source
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.")}