diff --git a/core/modules/language/lib/Drupal/language/LanguageAccessController.php b/core/modules/language/lib/Drupal/language/LanguageAccessController.php index 82f994e..6636def 100644 --- a/core/modules/language/lib/Drupal/language/LanguageAccessController.php +++ b/core/modules/language/lib/Drupal/language/LanguageAccessController.php @@ -19,7 +19,7 @@ class LanguageAccessController extends EntityAccessController { */ public function access(EntityInterface $entity, $operation, $langcode = Language::LANGCODE_DEFAULT, AccountInterface $account = NULL) { switch ($operation) { - case 'edit': + case 'update': case 'delete': return !$entity->locked && user_access('administer languages'); break; diff --git a/core/modules/language/lib/Drupal/language/LanguageListController.php b/core/modules/language/lib/Drupal/language/LanguageListController.php index 9dbe40a..d729b78 100644 --- a/core/modules/language/lib/Drupal/language/LanguageListController.php +++ b/core/modules/language/lib/Drupal/language/LanguageListController.php @@ -38,8 +38,8 @@ public function getOperations(EntityInterface $entity) { $operations = parent::getOperations($entity); $default = language_default(); - // Edit and delete path for Languages entities have a different scheme - // then other config entities. + // Edit and delete path for Languages entities have a different pattern + // than other config entities. $path = 'admin/config/regional/language'; if (isset($operations['edit'])) { $operations['edit']['href'] = $path . '/edit/' . $entity->id(); @@ -48,6 +48,7 @@ public function getOperations(EntityInterface $entity) { $operations['delete']['href'] = $path . '/delete/' . $entity->id(); } + // Deleting the site default language is not allowed. if ($entity->id() == $default->id) { unset($operations['delete']); }