MishkaCmsCore. Runtime. Resources. Validations. TenantOwnsRecord
(Mishka CMS Core v0.0.1)
Copy Markdown
View Source
Refuses a site's change to a row that belongs to no site, or to another one.
On a global? true resource a site can read the global rows and the rows of its own site, and
nothing in Ash stops it writing to either of the others. The row's CURRENT site_id is compared
with the tenant of the action: a global row is refused with :global, a row of another site with
:foreign. An action with no tenant (a master's) passes, and so does a row of the tenant's own
site.
Options
:global- Required. The message for a global row.:foreign- Required. The message for a row of another site.
Usage
validate {MishkaCmsCore.Runtime.Resources.Validations.TenantOwnsRecord,
global: dgettext_noop("errors", "Cannot modify global layout."),
foreign: dgettext_noop("errors", "Cannot modify layout from another site.")}