Only show translate button if user has permission to translate content

Created on 13 October 2020, over 3 years ago
Updated 24 October 2023, 8 months ago

Problem/Motivation

If a user does not have the translate content permission, she/he should not see the translate button in the moderation_sidebar. Atm this results in a UX wtf, see below.

Steps to reproduce

  • Allow translation for a content type, remove permissions for a certain role to translate that content type
  • Open moderation sidebar for node
  • Click Translate
  • Click View all translations (the only option)
  • User sees 403

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Needs review

Version

1.4

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany anruether Bonn

Live updates comments and jobs are added and updated live.
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.

  • First commit to issue fork.
  • Open on Drupal.org β†’
    Core: 9.5.5 + Environment: PHP 7.4 & MySQL 5.7
    last update 12 months ago
    Waiting for branch to pass
  • @elgandoz opened merge request.
  • Status changed to Needs review 11 months ago
  • πŸ‡¦πŸ‡ΊAustralia elgandoz Canberra

    @anruether the Merge request provided fixes this issue, could you please review?

  • πŸ‡·πŸ‡ΊRussia gifthorse

    Works for me, the button hides. Test fails in #5 don't seem to be related to the fix.

Production build 0.69.0 2024