-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Enforce: allowEditInvariantFromNonDefault configuration in the Backoffice UI #19265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enforce: allowEditInvariantFromNonDefault configuration in the Backoffice UI #19265
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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;
...c/packages/documents/documents/property-dataset-context/document-property-dataset.context.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful
This PR fixes the implementation of the
allowEditInvariantFromNonDefault
config.This now means that when
allowEditInvariantFromNonDefault
isfalse
, it won't be possible to edit invariant culture fields from other cultures than the default.Fixes: #19241