Skip to content

v0.1.5

Latest

Choose a tag to compare

@bruceamoser bruceamoser released this 25 Aug 22:33

What's Changed

  • Fix the DataModelValidationError: ownership is not a mapping of user IDs and document permission levels on 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 (-10 no-change / -20 default) 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 + stopImmediatePropagation so 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.FormDataExtended to 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