Skip to content

add #85974 first-use tracking, fail-closed usage checks and author re… - #137

Open
TomasHermanek wants to merge 17 commits into
mainfrom
feature/#85974/naxos-photo-migration
Open

add #85974 first-use tracking, fail-closed usage checks and author re…#137
TomasHermanek wants to merge 17 commits into
mainfrom
feature/#85974/naxos-photo-migration

Conversation

@TomasHermanek

Copy link
Copy Markdown
Contributor

…index

Tomas Hermanek and others added 17 commits August 3, 2026 11:40
* fix #85974 apply code review findings

Scope undeclared-IPTC charset recovery to IPTC-group tags only, cover the
cp1252 undo table with unit tests, replace optional-service DI fallbacks
with required constructor dependencies, fix the stale Symfony 8 changelog
claim, rename the searcNext typo bind, write modified_at from app time,
log skipped unknown first-use damIds and document DBAL row shapes.

* add #86373 licence flags, auto delete rule and storage override config

AssetLicence gains admin-editable flags (manualUploadAllowed, directUseAllowed)
and autoDelete (active, olderThanDays) embeds with a class-level constraint
validator; per-licence storage overrides live in immutable bundle config
(asset_licence_storage_overrides) resolved via AssetLicenceStorageOverrideProvider.

* add #86373 manual upload guard for adm ingest paths

Licences with flags.manualUploadAllowed=false reject adm file create,
create-to-asset, external provider upload and adm copy target
(licence_manual_upload_disabled); sys api, commands and job processors
stay unguarded by design.

* add #86373 per licence storage override resolution

FileSystemProvider resolves asset file and optimal resize storages through
the immutable asset_licence_storage_overrides config; crop cache reads and
deletes go through getCropFilesystemByImage, with the crop storage carried
on AssetFileDeleteEvent while the entity is still alive.

* add #86373 asset licence retention delete

AssetLicenceRetentionFacade sweeps licences with active auto delete and
removes their assets older than the configured threshold in batches:
retention conditions live directly in the DQL, licence config is re-read
every batch so disabling retention stops a running sweep, used or
undeletable assets are skipped with a warning and the cursor advances
past them; deletions run per batch in a transaction with file stash and
event dispatch after commit.

* docs #86373 changelog for agency licence settings

* fix #86373 apply code review findings

Split the retention batch transaction from post-commit cleanup with a
guarded rollback so a cleanup failure cannot mask the original error,
require storage_name and crop_storage_name together in the override
config, share the MIN_OLDER_THAN_DAYS boundary between validator, sweep
guard and DQL, type the override config at the DI boundary via
AssetLicenceStorageOverrideConfiguration, and cover the mid-run disable
and minimum-boundary scenarios with tests.

* ref #86373 delete retention assets regardless of usage

Retention licences have directUseAllowed disabled, so their assets are never
referenced directly (only copies under other licences are) — the usage check
in the retention sweep was pointless and is removed; deleteBulkNotUsed is
renamed to deleteBulkForRetention.

* ref #86373 retention deletes without checks, loop and embed validation cleanup

* ref #86373 replace dbal first use update with doctrine orm

---------

Co-authored-by: Tomas Hermanek <tomas.hermanek@petitpress.sk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant