You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
server:PATCH users/self runs the member.patch action of UsersController with all its settings and hooks. The 'patch self' collection action of 4.6.0 is removed: remove it from collection.allow and from overrides.
server: Relation controllers authorize their parent member after the parameters are validated, and asset uploads on relations always need the parent's patch authorization. handleRequestAuthorization(), authorizeMember() and getActionAuthorize() are removed.
server:getMember() uses member.get only where allow routes it, and otherwise fetches the member by id through fetchMember().
server: Validation:
The validator runs Ajv with strictSchema, strictNumbers and strictTuples, so schemas with unknown keywords, e.g. item instead of items, throw when the app sets up its models. Fix the schema, or pass new Validator({ options: { strictSchema: false } }), see Validator.
nullable properties with a model type or a $ref get the defaults of the referenced schema, and their own default.
$validateGraph() reports only the errors of related models for relations, and applies their defaults, unless it validates a patch.
The "must match "else" schema" errors of if keywords are left out.
server: Assets:
Asset files count one reference for each place that stores them, also several in one record. Run db:recount_assets after upgrading.
releaseUnusedAssets() removes unused assets after assets.cleanupTimeThreshold and unsaved uploads after assets.danglingTimeThreshold, instead of after the sum of both. With cleanupTimeThreshold: 0, unused assets are removed right away: to keep files, use a long threshold, e.g. '100y'.
releaseUnusedAssets() keeps assets that data still references despite a count of 0, and corrects their count. Unused assets are released after the write's transaction completes, so rollbacks can't lose files.
handleAddedAndRemovedAssets() throws an AssetError when an added file's asset was released in the meantime.
New
server:app.recountAssets() and the db:recount_assets command correct the reference counts of all assets, and app.getAssetReferences() finds every place that stores an asset file, see recountAssets().
admin:clipboard: { interchange: true } adds a menu to the Copy and Paste buttons to download the data with its files as a zip, and to upload it again, e.g. into another installation, see Download and Upload. interchange: { filename } names the downloads. Requires the new peer dependency fflate.
ui:DitoMenuButton:
Items take an icon, shown instead of their label, and the icon set has archive-download and archive-upload.
cover: false attaches the menu below the button.
Fixes
server, databases:
Model.count() and the count action count rows on SQLite and MySQL.
truncate() no longer applies the default scope of the model.
Relating several models to a many-to-many relation works on SQLite and MySQL.
With better-sqlite3, Date values in queries match stored dates, and a failed commit no longer makes every later transaction fail.
log.sql logs the rows of SQLite responses as arrays.
Upserts and array saves use the knex passed to query().
Constraint violations at commit, e.g. of deferred foreign keys, respond with 409 instead of 500.
server, validation: Typed objects with properties in allOf no longer reject each other's properties.
server, assets: Writes of several records count the asset references of each record, so deleting one no longer releases files that others still store.
admin:
Upload fields break long file names instead of widening their table.
The trail of the header scrolls where the header is too narrow for it.
The menu and the sidebar slide in and out without their content's layout changing.
The account menu opens below the user name.
Cancelling the object form of a view with a single component, e.g. the account settings, returns to the admin's root.
Downloads of clipboard: { interchange: true } are named after the form and item label, e.g. Page Home.zip.
ui: Tab moves through the items of an open DitoMenuButton instead of closing it.