Skip to content

Fix v5 folder history creation - #618

Open
GitKa3sar wants to merge 1 commit into
passbolt:masterfrom
GitKa3sar:codex/fix-v5-folder-history
Open

Fix v5 folder history creation#618
GitKa3sar wants to merge 1 commit into
passbolt:masterfrom
GitKa3sar:codex/fix-v5-folder-history

Conversation

@GitKa3sar

Copy link
Copy Markdown

V5 folder creation fails when Log plugin validates folder history

This pull request is a (multiple allowed):

  • bug fix
  • change of existing behavior
  • new feature

Checklist

  • User stories are present (given, when, then format)
  • Unit tests are passing
  • Selenium tests are passing (not run; this is a server-side history regression)
  • Check style is not triggering new error or warning

User story

Given that encrypted metadata is enabled and the Log plugin records entity history,
when a user creates a v5 folder without a plaintext name,
then the folder and its audit history should be created successfully without storing a plaintext name.

Given a v4 folder history payload,
when the plaintext name is missing,
then the existing validation error should still be returned.

What you did

Fixes #617.

  • Added a v5 validator for folder history that does not require the v4 plaintext name.
  • Selected that validator only when the source folder contains encrypted metadata.
  • Made folders_history.name explicitly nullable while preserving its 256-character limit.
  • Added model regression coverage for v5 and for the unchanged v4 requirement.
  • Added an integration regression test covering Model.afterSave, ActionLogsModelListener, detailed folder history, and entities_history.

Verification

  • FoldersHistoryTableTest: 4 tests, 8 assertions.
  • EntitiesHistoryCreateServiceTest: 2 tests, 7 assertions.
  • MetadataFoldersCreateControllerTest: 15 tests, 101 assertions.
  • PHP CodeSniffer on all changed files: passed.
  • PHPStan on all changed PHP source and tests: passed.

@CLAassistant

CLAassistant commented Aug 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

V5 folder creation fails when Log plugin validates folder history

2 participants