What's Changed
-
Fix the
DataModelValidationError: ownership is not a mapping of user IDs and document permission levelson Foundry v13/v14.Foundry v13/v14's Configure Ownership dialog now natively cascades folder ownership into contained documents, but it forwards the folder's meta-levels (
-10no-change /-20default) as-is — which are not valid stored ownership levels on a document. This threw validation errors on every contained document even though the module's own cascade applied the correct (cleaned) permissions.The module now detects AppV2 (v13/v14), attaches its submit listener in the capture phase, and when the cascade checkbox is checked it:
preventDefault+stopImmediatePropagationso Foundry's buggy native recursion doesn't run- saves the folder's ownership with a cleaned, valid ownership mapping
- cascades that same cleaned ownership to every contained document
- closes the app (AppV2 closes on submit by default)
Also switched to the namespaced
foundry.applications.ux.FormDataExtendedto remove the v13 deprecation warning.Verified live against Foundry 14.365: no validation errors, folder ownership saved, contained documents updated.
Compatibility
| Foundry VTT | Status |
|---|---|
| v11 | Minimum |
| v12 | Compatible |
| v13 | Compatible |
| v14 | Verified |