Source translation used instead of target when determining translation permissions

Created on 25 November 2020, almost 4 years ago
Updated 1 February 2023, over 1 year ago

Problem/Motivation

The translation being passed to determine if translation access is the source translation, not the target. But we should be identifying if the entity is translatable from the target. There is even a contrib module β†’ that takes advantage of this feature by creating more fine grained permissions based on per language access. This should be adjusted so we use the target language.

Steps to reproduce

Install allowed_languages v2. Add a couple or more languages to the site. Add a user who has access to edit a page content type and (via allowed languages module) access for a single language. As an admin user, create a page in another source language. Then login as the user who has access to the single user. This single user has UI elements to translate into their single language. But the save button is missing.

Proposed resolution

Pass along the target language entity, not the source to the permission checking.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

10.1 ✨

Component
Content translationΒ  β†’

Last updated 1 day ago

No maintainer
Created by

heddn Nicaragua

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request β†’ as a guide.

    This could use a test case to show the use case where this bug (if still one) pops up.

    Thanks!

Production build 0.71.5 2024