diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php index 4ef6911..c4fa043 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php @@ -31,21 +31,23 @@ public function getOperations(EntityInterface $entity) { $operations = parent::getOperations($entity); $uri = $entity->uri(); - if (!$entity->status()) { - $operations['enable'] = array( - 'title' => t('Enable'), - 'href' => $uri['path'] . '/enable', - 'options' => $uri['options'], - 'weight' => -10, - ); - } - else { - $operations['disable'] = array( - 'title' => t('Disable'), - 'href' => $uri['path'] . '/disable', - 'options' => $uri['options'], - 'weight' => 20, - ); + if (isset($this->entityInfo['entity_keys']['status'])) { + if (!$entity->status()) { + $operations['enable'] = array( + 'title' => t('Enable'), + 'href' => $uri['path'] . '/enable', + 'options' => $uri['options'], + 'weight' => -10, + ); + } + else { + $operations['disable'] = array( + 'title' => t('Disable'), + 'href' => $uri['path'] . '/disable', + 'options' => $uri['options'], + 'weight' => 20, + ); + } } return $operations; diff --git a/core/modules/user/lib/Drupal/user/RoleListController.php b/core/modules/user/lib/Drupal/user/RoleListController.php index 177b2d6..9ff5c83 100644 --- a/core/modules/user/lib/Drupal/user/RoleListController.php +++ b/core/modules/user/lib/Drupal/user/RoleListController.php @@ -48,7 +48,6 @@ public function getOperations(EntityInterface $entity) { // Built-in roles could not be deleted or disabled. if (in_array($entity->id(), array(DRUPAL_ANONYMOUS_RID, DRUPAL_AUTHENTICATED_RID))) { unset($operations['delete']); - unset($operations['disable']); } return $operations; }