When current user doesn't have access to "administer entityqueue" configure link is appearing without a link, see attachment for more information.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

abu-zakham created an issue. See original summary.

abu-zakham’s picture

Assigned: abu-zakham » Unassigned
Status: Active » Needs review
FileSize
690 bytes

This patch fixes the bug.

Regards.

abu-zakham’s picture

Title: should check user permission before changing edit link title. » EntityQueueListBuilder should check user permission before changing edit link title.

update title.

Rajab Natshah’s picture

Testing ....

abu-zakham’s picture

FileSize
707 bytes
amateescu’s picture

Status: Needs review » Needs work
+++ b/src/EntityQueueListBuilder.php
@@ -139,7 +139,9 @@ class EntityQueueListBuilder extends ConfigEntityListBuilder {
+    if(\Drupal::currentUser()->hasPermission('administer entityqueue')) {
+      $operations['edit']['title'] = $this->t('Configure');
+    }

Since the parent class already has this access check, we should simply check if $operations['edit'] is set :)

abu-zakham’s picture

FileSize
670 bytes

Yes amateescu you are right

abu-zakham’s picture

Status: Needs work » Needs review

  • amateescu committed 0ec6234 on 8.x-1.x authored by abu-zakham
    Issue #2839334 by abu-zakham: EntityQueueListBuilder should check the...
amateescu’s picture

Title: EntityQueueListBuilder should check user permission before changing edit link title. » EntityQueueListBuilder should check the existence of the 'edit' link before changing its title
Status: Needs review » Fixed

Nice, committed to 8.x-1.x. Thanks!

Status: Fixed » Closed (fixed)

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