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

Allow client to send language values, that user cannot persist #17052

Merged

Conversation

bergmania
Copy link
Member

@bergmania bergmania commented Sep 13, 2024

Description

Allows the client to send all content values for all languages when saving, even if the user do not have permissions to alter these.

The server ensures to rollback values the user do not have permission to alter.

This is a hack, but currently the only short-term solution to implement the language permissions feature in v14. Longer term, we should have a patch endpoint that can do the logic instead of the post endpoint.

Test

  • Setup multiple languages
  • Setup a user that do not have permissions to all languages
  • Try to save the content for all languages (Not publish, as it requires client changes)
    • Verify only the content for the languages the user is allowed to change, is actually updated. (You will need to update the browser, to get the data again.)

…he user do not have permissions to save a specific language.
@madsrasmussen
Copy link
Contributor

I have tested the PR in the backoffice and it works as expected for saving. We have the same problem with publishing and scheduling too.

@bergmania
Copy link
Member Author

@madsrasmussen, but for publishing I guess it make sense the client to not ask to publish those it is not allowed to?

@madsrasmussen
Copy link
Contributor

@bergmania of course, good point. There is a client fix for publishing here: umbraco/Umbraco.CMS.Backoffice#2298

@bergmania bergmania marked this pull request as ready for review September 17, 2024 12:26
@bergmania bergmania merged commit c5243e5 into v14/dev Sep 18, 2024
15 of 17 checks passed
@bergmania bergmania deleted the v14/feature/support-language-permissions-in-backend branch September 18, 2024 11:10
bergmania added a commit that referenced this pull request Sep 18, 2024
…he user do not have permissions to save a specific language. (#17052)

(cherry picked from commit c5243e5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants