add #85974 first-use tracking, fail-closed usage checks and author re… - #137
Open
TomasHermanek wants to merge 17 commits into
Open
add #85974 first-use tracking, fail-closed usage checks and author re…#137TomasHermanek wants to merge 17 commits into
TomasHermanek wants to merge 17 commits into
Conversation
* 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…index