Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300626

Warning "The Delete translation action is only available for published translations" is displayed also for users without the delete translatons permission

$
0
0

Problem/Motivation

Users are faced with a warning "The "Delete translation" action is only available for published translations." that a translation can't be deleted if it doesn't have the published moderation state.

Steps to reproduce

  1. Install Drupal (standard profile)
  2. Enable content_translation & content_moderation modules (/admin/modules)
  3. Add a new language, for example "Dutch" (/admin/config/regional/language/add)
  4. Enable content translation for "Content"& flag the "Article" content type as translatable (/admin/config/regional/content-language)
  5. Give the "Authenticated user" role the "Create translations", "Edit translations", "Translate Article content item", "Article: Create new content", "Article: Edit any content", "Editorial workflow: Use Create New Draft transition"& "Editorial workflow: Use Publish transition" permissions (/admin/people/permissions)
  6. Enable the editorial workflow on the article content type (/admin/config/workflow/workflows/manage/editorial)
  7. Create a new user, without any specific roles (/admin/people/create)
  8. Log in with the new user (/user/logout > /user/login)
  9. Create a new article node with the "Published" state (/node/add/article)
  10. Add a translation with the "Draft" state (/nl/node/1/translations/add/en/nl)
  11. Navigate to the "Translations" page of the created node (/node/1/translations)

Current behavior: a warning "The "Delete translation" action is only available for published translations." is displayed
Expected behavior: the warning to not show, since the user isn't allowed to delete translation (he/she is missing the "Delete translations" permission)

Proposed resolution

Before displaying the warning, first check if the user is allowed to delete the translation. If not, don't display the warning.


Viewing all articles
Browse latest Browse all 300626

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>