- Issue created by @Martin Mayer
- 🇮🇹Italy bigbabert Milano, Italy
Hi @martin mayer,
i'm aware of that issue, if you have time to make separate function that manage permissions for the translate action it could be in the formTranslate function inside the utility service. This will be great, if you mind we could also have chat on slack.
Best regards
- 🇩🇪Germany Martin Mayer Germany and Philippines
I wrote you on Slack. You are certainly right, the formTranslate function is the right place. I will come up with some code.
- 🇩🇪Germany Martin Mayer Germany and Philippines
Hi @bigbabert,
it turned out that all that needs to be done is to remove the few lines of code in Utlitiy.php which create the error message. Just the return statement remains. I think there is no error message necessary here because if the user does not have the permission to auto translate, manual translation is still possible. And it will remove the wrong error messages, when a user opens an unrelated form.
I add a patch to the issue on drupal.org.
The other checks from my earlier patch in this issue and the one from https://www.drupal.org/project/auto_translation/issues/3530226 🐛 User without translation permission get error messages on forms unrelated to translation. Active are not necessary and the code can be removed again, because the fromTranslate function in utility.php does this checks already.
- 🇮🇹Italy bigbabert Milano, Italy
Hi @martin,
before to release the patch we should test if it work properly with autosave_form → module.
Best regards
-
bigbabert →
committed 31debf1a on 1.0.x
Issue #3531195 by martin mayer: User without translation permission get...
-
bigbabert →
committed 31debf1a on 1.0.x