Problem/Motivation
In a multilingual site I set content access to enable translation for Basic page and another content type called "Club".
Permissions for "Translate Basic page content" are set for administrator only.
I need an editor to be able to translate content type "club" so I set permission for editor to "Translate Club content".
Now I am facing two problems:
1. If I do not set the "Create translations" permission for editor, there is no local task for "Translate" when editor views a "Club" node.
2. If I do set the "Create translations" permission for editor, there is a local task for "Translate" and all works fine but this "Translate" local task is also showing on other content types (which are not configured for editor translations).
When editor clicks on "Translate" for other content types (like Basic page) he gets the translation table but not edit or add option i.e you cannot really translate.
Steps to reproduce
Steps to reproduce:
- Enable translation for 2 content types
- Create a role and give permission to translate 1 of them. Give the user permission to create/edit/delete translations
- When using that role visit a node of the other content type where you do not have translation permission.
- You will now see a translation tab there even if you don't have permission to translate into that entity. When you click on the translation tab you will see all translations listed, but you cannot perform any actions.
Proposed resolution
- Add check for bundle permission to function content_translation_translate_access
Remaining tasks
- Review patch
User interface changes
- Translation overview tab is only visible if user have necessary permissions to translate.
API changes
- None
Data model changes
- None