Skip to content
Snippets Groups Projects

Issue #3492000: Edit Operation does not show on listing page, but menu can be edited

Open Issue #3492000: Edit Operation does not show on listing page, but menu can be edited
Open Scott Joudry requested to merge issue/group_content_menu-3492000:2.0.x into 2.0.x
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -102,14 +102,14 @@ class GroupContentMenuListBuilder extends EntityListBuilder {
if ($group_relationship = reset($group_relationships)) {
$entity_type_id = $entity->getEntityTypeId();
$account = \Drupal::currentUser()->getAccount();
if ($entity->hasLinkTemplate('edit-form') && $group_relationship->getGroup()->hasPermission("update own group_content_menu:$entity_type_id entity", $account)) {
if ($entity->hasLinkTemplate('edit-form') && $group_relationship->getGroup()->hasPermission('manage group_content_menu menu items', $account)) {
$operations['edit'] = [
'title' => $this->t('Edit'),
'weight' => 10,
'url' => $entity->toUrl('edit-form'),
];
}
if ($entity->hasLinkTemplate('delete-form') && $group_relationship->getGroup()->hasPermission("delete own group_content_menu:$entity_type_id entity", $account)) {
if ($entity->hasLinkTemplate('delete-form') && $group_relationship->getGroup()->hasPermission('manage group_content_menu', $account)) {
$operations['delete'] = [
'title' => $this->t('Delete'),
'weight' => 100,
Loading