Enforce: allowEditInvariantFromNonDefault configuration in the Backoffice UI#19265
Merged
nielslyngsoe merged 5 commits intorelease/16.0from May 9, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR aims to enforce the new behavior for the allowEditInvariantFromNonDefault configuration by preventing the editing of invariant culture fields outside the default language.
- Removed configuration-based editing logic from the document workspace context.
- Introduced invariant editing prevention logic into the document property dataset context.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Umbraco.Web.UI.Client/src/packages/documents/documents/workspace/document-workspace.context.ts | Removed obsolete configuration consumption and prevention logic. |
| src/Umbraco.Web.UI.Client/src/packages/documents/documents/property-dataset-context/document-property-dataset.context.ts | Added enforcement for invariant editing prevention using variant options and property rules. |
Comments suppressed due to low confidence (1)
src/Umbraco.Web.UI.Client/src/packages/documents/documents/property-dataset-context/document-property-dataset.context.ts:47
- The rule unique identifier naming here is different from the earlier approach in the workspace context. Consider consolidating the naming conventions (e.g., using consistent casing and format) across modules to improve clarity.
const unique = 'UMB_PREVENT_EDIT_INVARIANT_FROM_NON_DEFAULT_' + property.unique;
nielslyngsoe
reviewed
May 8, 2025
...c/packages/documents/documents/property-dataset-context/document-property-dataset.context.ts
Outdated
Show resolved
Hide resolved
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.
This PR fixes the implementation of the
allowEditInvariantFromNonDefaultconfig.This now means that when
allowEditInvariantFromNonDefaultisfalse, it won't be possible to edit invariant culture fields from other cultures than the default.Fixes: #19241