The Translate operation is always added in the ListController as we don't have moved the user_access check from the form_alter to the operations_alter. If you click on it, you get access denied.

Patch follows in a second.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kfritsche’s picture

Assigned: kfritsche » Unassigned
Status: Active » Needs review
FileSize
2.12 KB
2.99 KB

Added user_check and a test for it.

As proof that it works uploading also a test-only patch.

Gábor Hojtsy’s picture

Status: Needs review » Needs work

The patch looks good. Only one thing.

+++ b/lib/Drupal/config_translation/Tests/ConfigTranslationListUITest.phpundefined
@@ -39,7 +39,12 @@ class ConfigTranslationListUITest extends WebTestBase {
+   * @var \Drupal\user\Plugin\Core\Entity\User Admin user with all needed permissions.

The explanation should be on a line above @var not on the same line.

Gábor Hojtsy’s picture

"Link containing href admin/structure/views/view/test_view/translate found."

Looks like the test view does not have a language assigned.

kfritsche’s picture

Status: Needs work » Needs review
FileSize
1.49 KB
3.87 KB

In some case it was good that it failed as it indirectly proofs that the test works.
In the view test the user hadn't the 'translate configuration' permission and wasn't allowed to see the translate link.

I fixed the wrong comment and added the 'translate configuration' permission to the user in the view test. Works locally.

Status: Needs review » Needs work

The last submitted patch, config_translation-2028649-Add-access-check-3.patch, failed testing.

kfritsche’s picture

kfritsche’s picture

Status: Needs work » Needs review
Gábor Hojtsy’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.