Skip to content
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

Account for AllowEditInvariantFromNonDefault when updating properties #17333

Conversation

Zeegaan
Copy link
Member

@Zeegaan Zeegaan commented Oct 22, 2024

Notes

  • This now uses the AllowEditInvariantFromNonDefault to check when we have to overwrite the edited value.

How to test

  • Create multiple languages
  • Create User with access to only 1 language (has to be a non default one)
  • Create a Doctype with allow variance, with 2 properties, one variant and one invariant
  • Create a document in each language
  • Login with the user you just updated
  • Update both the variant and invariant properties in the language you have access to, you should not be able to edit the invariant property, and it should not change.

@kjac kjac merged commit 60a0b65 into v15/fix/block-level-language-permissions Oct 25, 2024
12 of 15 checks passed
@kjac kjac deleted the v15/fix/account-for-allow-edit-invariant-from-non-default branch October 25, 2024 10:27
kjac added a commit that referenced this pull request Nov 5, 2024
* Support limited language access at block level

* Account for AllowEditInvariantFromNonDefault when updating properties (#17333)

* Remove obsolete ctor

* Add explanatory comment

* Set AllowEditInvariantFromNonDefault to true on tests

* Refactor to account for merge and default language

* Merge invariant values on top of the already merged values

* Add integration test to prove invariant merging

---------

Co-authored-by: kjac <[email protected]>

---------

Co-authored-by: Nikolaj Geisle <[email protected]>
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.

2 participants