Translation of content permission is no longer assigned to content manager or site manager when they get created

Created on 3 November 2023, about 1 year ago

Problem/Motivation

In Issue #3384622 β†’ with PR #3499 we remove the assignment of the translate permissions because these permissions don’t exist when the content translation module is not enabled and having non-existent permissions assigned is disallowed in Drupal 10.

The change record in the PR helpfully reads

When installing Open Social, permissions listed below should be granted manually (before they were granted automatically).
translate book node
translate event node
translate flexible_group group
translate landing_page node
translate page node
translate topic node
translate data_policy

However, from a product perspective this is problematic because when enabling features we don’t want manual work of adding permissions. The PR itself does not add any code to automatically re-assign these permissions when they exist.

Steps to reproduce

How to test 1
- Install Open Social
- Enable social_content_translation
- Add at least one additional language
- As a content manager and as a site manager try to translate:
- basic page
- event
- topic
- flexible group
- As an admin go to admin/people/permissions and confirm that
- "Translate Basic page content item"
- "Translate Event content item"
- "Translate Topic content item"
- "Translate Flexible group group"
are granted for content manager and site manager

How to test 2
- Install Open Social
- Enable social_content_translation
- Enable social_landing_page
- Add at least one additional language
- As a content manager and as a site manager try to translate:
- landing page
- As an admin go to admin/people/permissions and confirm that "Translate Landing page content item" is granted for content manager and site manager

How to test 3
- Install Open Social
- Enable social_content_translation
- Enable data_policy
- Add at least one additional language
- As a site manager try to translate:
- data policy
- As an admin go to admin/people/permissions and confirm that "Translate data policy is granted" for site manager

How to test 4
- Install Open Social
- Enable social_content_translation
- Enable social_book
- Add at least one additional language
- As a content manager and as a site manager try to translate:
- book
- As an admin go to admin/people/permissions and confirm that "Translate Book content item" is granted for content manager and site manager

Proposed resolution

Automatically grant permissions listed below:
- translate book node
- translate event node
- translate flexible_group group
- translate landing_page node
- translate page node
- translate topic node
- translate data_policy

Remaining tasks

N/A

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Fixed

Version

12.0

Component

Code (back-end)

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024