Problem/Motivation

I used the module to automatically translate my content, but I have a role that doesn't have this permission, yet the translation button still appears.

There seems to be a permissions conflict between manual translation and automatic translation via the module.
Currently, the manual translation permission overrides any other permissions granted by the module.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jérôme dehorter created an issue. See original summary.

jérôme dehorter’s picture

Hi,
I've created the patch.

Please review and approve it.

kallado’s picture

Thnks I'm kind of busy right now but i'll review it as soon as I can

kallado’s picture

Status: Active » Needs work

I think theres still an issue beacause in node/[id]/translations the button still shows on the operation links even without permission. I think adding an auto_node_translate_translate_access($entity)->isAllowed() before changing the links in auto_node_translate_preprocess_links hook should do the trick

kallado’s picture

@jérôme dehorter Fixed the issue int the node translations tab can you review?

kallado’s picture

Status: Needs work » Needs review
jérôme dehorter’s picture

Hi @kallado,
I try to review but I got this error on composer install command :

Gathering patches for dependencies. This might take a minute.
  - Installing drupal/auto_node_translate (3.0.2): Extracting archive
  - Applying patches for drupal/auto_node_translate
    https://git.drupalcode.org/project/auto_node_translate/-/merge_requests/10.patch ([Active] https://www.drupal.org/project/auto_node_translate/issues/3575696)
   Could not apply patch! Skipping. The error was: Cannot apply patch https://git.drupalcode.org/project/auto_node_translate/-/merge_requests/10.patch

I think you're having the same problem I did with the patch on MR 9. After fixing the PHPCS issues, I couldn't install the MR 9 patch. That's why I reverted to a version without PHPCS fix in MR 10.

kallado’s picture

Ok i've tested it locally and had no issues I'm movin forward with this.