MishkaCmsCore.Runtime.Resources.Validations.FolderParent (Mishka CMS Core v0.0.1)

Copy Markdown View Source

Refuses a media folder put inside itself, or inside one of its own subfolders.

Either would cut the folder and everything under it off from the top level, with no way back through the library. Asked only when an existing folder's parent_id changes: a new folder has nothing under it yet.

The folders above the new parent are read as the action's actor, one level at a time — see MishkaCmsCore.Runtime.MediaCategory.trail/2. When they cannot be read, the move is refused rather than let through unchecked.

Each refusal is on :parent_id, in the errors domain. Whether the parent is a live folder of the same site is MishkaCmsCore.Runtime.Resources.Validations.SameSiteReference's check.