Group-Permission to translate content

Created on 28 March 2017, almost 8 years ago
Updated 2 December 2024, 3 months ago

Problem/Motivation

Currently it is not possible to restrict translate permissions to group-related nodes. Even if the user is not member of the group, he is able to create, update or delete translations of its nodes.

Steps to reproduce (e.g. on simplytest.me):

  1. Install drupal with standard profile
  2. Install modules Content Translation, Language and of course Group and Group Node
  3. Add another language
  4. Enable translation for node type article
  5. Add role translator with permissions to Create and Edit content translations and to Access the Content overview page
  6. Create user with role translator
  7. Create group type Editors
  8. Add group type permissions Group node (Article) - Entity: View content entities for outsiders
  9. Create two groups A and B of this type
  10. Add user translator to group B
  11. Create and publish a node related to group A
  12. Login as translator and go to /admin/content. You should see action translate nearby the content which is not related to your group

Proposed resolution

Add group type permissions:

  • Group node (Node Type Foo) - Entity: Translate any content entities
  • Group node (Node Type Foo) - Entity: Translate own content entities
  • Group node (Node Type Foo) - Entity: Delete any content entity translation
  • Group node (Node Type Foo) - Entity: Delete own content entity translation

And restrict translation (create/update/delete) for users who don't have the permission.

Feel free to complement or correct me (and my grammar).

Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

🇩🇪Germany pminf Nuremburg (Germany), formerly Dresden

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

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 Kingdom lazysoundsystem

    Four years on, this issue seems the most promising for permissions to translate content, but the patch is for 1.x and the core patch hasn't landed yet.

    Is there another way to add permissions for translation, or is this approach still the recommended way to go? If so, I can re-roll both this patch and the core one.

  • 🇬🇧United Kingdom lazysoundsystem

    This is a re-roll of for 8.2.x (and without the tests) which goes with the patch on https://www.drupal.org/project/drupal/issues/3056020 📌 Content translation access control Needs work .

Production build 0.71.5 2024