commit a1311e558fafbe0a5450172701a517b9a45d0647
Author: Bart Feenstra <bart@mynameisbart.com>
Date:   Thu Feb 20 09:49:10 2014 +0100

    Tim Plunkett was here.

diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityAccessController.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityAccessController.php
new file mode 100644
index 0000000..539d04f
--- /dev/null
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityAccessController.php
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Config\Entity\ConfigEntityAccessController.
+ */
+
+namespace Drupal\Core\Config\Entity;
+
+use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Entity\EntityInterface;
+use Drupal\Core\Session\AccountInterface;
+
+/**
+ * Provides default access control for configuration entities.
+ */
+class ConfigEntityAccessController extends EntityAccessController {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function checkAccess(EntityInterface $entity, $operation, $langcode, AccountInterface $account) {
+    /** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
+    if (in_array($operation, array('enable', 'disable'))) {
+      // Only if the entity type has a status it can be enabled or disabled.
+      if ($this->entityType->hasKey('status')) {
+        $is_enabled = $entity->status();
+        $can_be_toggled = $operation == 'disable' ? $is_enabled : !$is_enabled;
+        return $can_be_toggled && $this->access($entity, 'update', $langcode, $account);
+      }
+      else {
+        return FALSE;
+      }
+    }
+    return parent::checkAccess($entity, $operation, $langcode, $account);
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php
index 54afad2..ccd35df 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListController.php
@@ -33,19 +33,17 @@ public function load() {
   public function getOperations(EntityInterface $entity) {
     $operations = parent::getOperations($entity);
 
-    if ($this->entityType->hasKey('status')) {
-      if (!$entity->status() && $entity->hasLinkTemplate('enable')) {
-        $operations['enable'] = array(
-          'title' => t('Enable'),
-          'weight' => -10,
-        ) + $entity->urlInfo('enable');
-      }
-      elseif ($entity->hasLinkTemplate('disable')) {
-        $operations['disable'] = array(
-          'title' => t('Disable'),
-          'weight' => 40,
-        ) + $entity->urlInfo('disable');
-      }
+    if ($entity->access('enable') && $entity->hasLinkTemplate('enable')) {
+      $operations['enable'] = array(
+        'title' => t('Enable'),
+        'weight' => -10,
+      ) + $entity->urlInfo('enable');
+    }
+    if ($entity->access('disable') && $entity->hasLinkTemplate('disable')) {
+      $operations['disable'] = array(
+        'title' => t('Disable'),
+        'weight' => 40,
+      ) + $entity->urlInfo('disable');
     }
 
     return $operations;
diff --git a/core/modules/block/block.api.php b/core/modules/block/block.api.php
index 065a1cd..71079fb 100644
--- a/core/modules/block/block.api.php
+++ b/core/modules/block/block.api.php
@@ -86,7 +86,7 @@ function hook_block_view_BASE_BLOCK_ID_alter(array &$build, \Drupal\block\BlockP
  * @return bool|null
  *   FALSE denies access. TRUE allows access unless another module returns
  *   FALSE. If all modules return NULL, then default access rules from
- *   \Drupal\block\BlockAccessController::checkAccess() are used.
+ *   \Drupal\block\BlockEntityAccessController::checkAccess() are used.
  *
  * @see \Drupal\Core\Entity\EntityAccessController::access()
  * @see \Drupal\block\BlockAccessController::checkAccess()
diff --git a/core/modules/block/lib/Drupal/block/BlockAccessController.php b/core/modules/block/lib/Drupal/block/BlockAccessController.php
index 9469ffc..c782365 100644
--- a/core/modules/block/lib/Drupal/block/BlockAccessController.php
+++ b/core/modules/block/lib/Drupal/block/BlockAccessController.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\block\BlockAccessController.
+ * Contains \Drupal\block\BlockEntityAccessController.
  */
 
 namespace Drupal\block;
 
-use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityControllerInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
@@ -19,7 +19,7 @@
 /**
  * Provides a Block access controller.
  */
-class BlockAccessController extends EntityAccessController implements EntityControllerInterface {
+class BlockEntityAccessController extends ConfigEntityAccessController implements EntityControllerInterface {
 
   /**
    * The node grant storage.
@@ -29,7 +29,7 @@ class BlockAccessController extends EntityAccessController implements EntityCont
   protected $aliasManager;
 
   /**
-   * Constructs a BlockAccessController object.
+   * Constructs a BlockEntityAccessController object.
    *
    * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
    *   The entity type definition.
diff --git a/core/modules/block/lib/Drupal/block/Entity/Block.php b/core/modules/block/lib/Drupal/block/Entity/Block.php
index 9437e77..981737e 100644
--- a/core/modules/block/lib/Drupal/block/Entity/Block.php
+++ b/core/modules/block/lib/Drupal/block/Entity/Block.php
@@ -19,7 +19,7 @@
  *   id = "block",
  *   label = @Translation("Block"),
  *   controllers = {
- *     "access" = "Drupal\block\BlockAccessController",
+ *     "access" = "Drupal\block\BlockEntityAccessController",
  *     "view_builder" = "Drupal\block\BlockViewBuilder",
  *     "list" = "Drupal\block\BlockListController",
  *     "form" = {
diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestAccessController.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestAccessController.php
index cec5421..b4bde4c 100644
--- a/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestAccessController.php
+++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/ConfigTestAccessController.php
@@ -2,25 +2,29 @@
 
 /**
  * @file
- * Contains \Drupal\config_test\ConfigTestAccessController.
+ * Contains \Drupal\config_test\ConfigTestEntityAccessController.
  */
 
 namespace Drupal\config_test;
 
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Session\AccountInterface;
-use Drupal\Core\Entity\EntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Language\Language;
 
 /**
  * Defines the access controller for the config_test entity type.
  */
-class ConfigTestAccessController extends EntityAccessController {
+class ConfigTestEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
    */
   public function checkAccess(EntityInterface $entity, $operation, $langcode, AccountInterface $account) {
+    /** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */
+    if (in_array($operation, array('enable', 'disable'))) {
+      return parent::checkAccess($entity, $operation, $langcode, $account);
+    }
     return TRUE;
   }
 
diff --git a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php
index 36d7fbf..72ba0d6 100644
--- a/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php
+++ b/core/modules/config/tests/config_test/lib/Drupal/config_test/Entity/ConfigTest.php
@@ -23,7 +23,7 @@
  *       "default" = "Drupal\config_test\ConfigTestFormController",
  *       "delete" = "Drupal\config_test\Form\ConfigTestDeleteForm"
  *     },
- *     "access" = "Drupal\config_test\ConfigTestAccessController"
+ *     "access" = "Drupal\config_test\ConfigTestEntityAccessController"
  *   },
  *   config_prefix = "config_test.dynamic",
  *   entity_keys = {
diff --git a/core/modules/contact/lib/Drupal/contact/CategoryAccessController.php b/core/modules/contact/lib/Drupal/contact/CategoryAccessController.php
index f798d79..73b2d25 100644
--- a/core/modules/contact/lib/Drupal/contact/CategoryAccessController.php
+++ b/core/modules/contact/lib/Drupal/contact/CategoryAccessController.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\contact\CategoryAccessController.
+ * Contains \Drupal\contact\CategoryEntityAccessController.
  */
 
 namespace Drupal\contact;
 
-use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
 
@@ -16,7 +16,7 @@
  *
  * @see \Drupal\contact\Entity\Category.
  */
-class CategoryAccessController extends EntityAccessController {
+class CategoryEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Category.php b/core/modules/contact/lib/Drupal/contact/Entity/Category.php
index e02994e..a05ca8e 100644
--- a/core/modules/contact/lib/Drupal/contact/Entity/Category.php
+++ b/core/modules/contact/lib/Drupal/contact/Entity/Category.php
@@ -18,7 +18,7 @@
  *   id = "contact_category",
  *   label = @Translation("Contact category"),
  *   controllers = {
- *     "access" = "Drupal\contact\CategoryAccessController",
+ *     "access" = "Drupal\contact\CategoryEntityAccessController",
  *     "list" = "Drupal\contact\CategoryListController",
  *     "form" = {
  *       "add" = "Drupal\contact\CategoryFormController",
diff --git a/core/modules/filter/filter.routing.yml b/core/modules/filter/filter.routing.yml
index 6dd8138..acf7551 100644
--- a/core/modules/filter/filter.routing.yml
+++ b/core/modules/filter/filter.routing.yml
@@ -45,4 +45,4 @@ filter.admin_disable:
     _title: 'Disable text format'
   requirements:
     _filter_disable_format_access: 'TRUE'
-    _permission: 'administer filters'
+    _entity_access: filter_format.disable
diff --git a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php
index 5487c12..6da4dce 100644
--- a/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php
+++ b/core/modules/filter/lib/Drupal/filter/Entity/FilterFormat.php
@@ -27,7 +27,7 @@
  *       "disable" = "Drupal\filter\Form\FilterDisableForm"
  *     },
  *     "list" = "Drupal\filter\FilterFormatListController",
- *     "access" = "Drupal\filter\FilterFormatAccessController",
+ *     "access" = "Drupal\filter\FilterFormatEntityAccessController",
  *   },
  *   config_prefix = "filter.format",
  *   admin_permission = "administer filters",
diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php
index 9d3207d..f83f418 100644
--- a/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php
+++ b/core/modules/filter/lib/Drupal/filter/FilterFormatAccessController.php
@@ -2,19 +2,19 @@
 
 /**
  * @file
- * Contains \Drupal\filter\FilterFormatAccessController.
+ * Contains \Drupal\filter\FilterFormatEntityAccessController.
  */
 
 namespace Drupal\filter;
 
-use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
 
 /**
  * Defines the access controller for the filter format entity type.
  */
-class FilterFormatAccessController extends EntityAccessController {
+class FilterFormatEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/language/language.module b/core/modules/language/language.module
index 5a7218b..ca4c637 100644
--- a/core/modules/language/language.module
+++ b/core/modules/language/language.module
@@ -117,7 +117,7 @@ function language_menu_link_defaults() {
 /**
  * Editing or deleting locked languages should not be possible.
  *
- * @deprecated Use \Drupal\language\LanguageAccessController instead.
+ * @deprecated Use \Drupal\language\LanguageEntityAccessController instead.
  */
 function language_access_language_edit_or_delete($language) {
   return !$language->locked && \Drupal::currentUser()->hasPermission('administer languages');
diff --git a/core/modules/language/lib/Drupal/language/Entity/Language.php b/core/modules/language/lib/Drupal/language/Entity/Language.php
index bc42a81..282b138 100644
--- a/core/modules/language/lib/Drupal/language/Entity/Language.php
+++ b/core/modules/language/lib/Drupal/language/Entity/Language.php
@@ -20,7 +20,7 @@
  *   label = @Translation("Language"),
  *   controllers = {
  *     "list" = "Drupal\language\LanguageListController",
- *     "access" = "Drupal\language\LanguageAccessController",
+ *     "access" = "Drupal\language\LanguageEntityAccessController",
  *     "form" = {
  *       "add" = "Drupal\language\Form\LanguageAddForm",
  *       "edit" = "Drupal\language\Form\LanguageEditForm",
diff --git a/core/modules/language/lib/Drupal/language/LanguageAccessController.php b/core/modules/language/lib/Drupal/language/LanguageAccessController.php
index 2cc17d0..d982974 100644
--- a/core/modules/language/lib/Drupal/language/LanguageAccessController.php
+++ b/core/modules/language/lib/Drupal/language/LanguageAccessController.php
@@ -2,17 +2,17 @@
 
 /**
  * @file
- * Contains \Drupal\language\LanguageAccessController.
+ * Contains \Drupal\language\LanguageEntityAccessController.
  */
 
 namespace Drupal\language;
 
-use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Session\AccountInterface;
 
-class LanguageAccessController extends EntityAccessController {
+class LanguageEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/node/lib/Drupal/node/Entity/NodeType.php b/core/modules/node/lib/Drupal/node/Entity/NodeType.php
index eb1c57a..5e99964 100644
--- a/core/modules/node/lib/Drupal/node/Entity/NodeType.php
+++ b/core/modules/node/lib/Drupal/node/Entity/NodeType.php
@@ -20,7 +20,7 @@
  *   id = "node_type",
  *   label = @Translation("Content type"),
  *   controllers = {
- *     "access" = "Drupal\node\NodeTypeAccessController",
+ *     "access" = "Drupal\node\NodeTypeEntityAccessController",
  *     "form" = {
  *       "add" = "Drupal\node\NodeTypeFormController",
  *       "edit" = "Drupal\node\NodeTypeFormController",
diff --git a/core/modules/node/lib/Drupal/node/NodeTypeAccessController.php b/core/modules/node/lib/Drupal/node/NodeTypeAccessController.php
index 23ec80f..817bdb9 100644
--- a/core/modules/node/lib/Drupal/node/NodeTypeAccessController.php
+++ b/core/modules/node/lib/Drupal/node/NodeTypeAccessController.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\taxonomy\NodeTypeAccessController.
+ * Contains \Drupal\taxonomy\NodeTypeEntityAccessController.
  */
 
 namespace Drupal\node;
 
-use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
 
@@ -16,7 +16,7 @@
  *
  * @see \Drupal\node\Entity\NodeType.
  */
-class NodeTypeAccessController extends EntityAccessController {
+class NodeTypeEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php
index c640abe..a225c70 100644
--- a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php
+++ b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php
@@ -21,7 +21,7 @@
  *   id = "search_page",
  *   label = @Translation("Search page"),
  *   controllers = {
- *     "access" = "Drupal\search\SearchPageAccessController",
+ *     "access" = "Drupal\search\SearchPageEntityAccessController",
  *     "storage" = "Drupal\Core\Config\Entity\ConfigStorageController",
  *     "list" = "Drupal\search\SearchPageListController",
  *     "form" = {
diff --git a/core/modules/search/lib/Drupal/search/SearchPageAccessController.php b/core/modules/search/lib/Drupal/search/SearchPageAccessController.php
index cd51278..fc87813 100644
--- a/core/modules/search/lib/Drupal/search/SearchPageAccessController.php
+++ b/core/modules/search/lib/Drupal/search/SearchPageAccessController.php
@@ -2,20 +2,20 @@
 
 /**
  * @file
- * Contains \Drupal\search\SearchPageAccessController.
+ * Contains \Drupal\search\SearchPageEntityAccessController.
  */
 
 namespace Drupal\search;
 
 use Drupal\Core\Access\AccessibleInterface;
-use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
 
 /**
  * Defines the access controller for the search page entity type.
  */
-class SearchPageAccessController extends EntityAccessController {
+class SearchPageEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/search/search.routing.yml b/core/modules/search/search.routing.yml
index 8cdec79..909faf4 100644
--- a/core/modules/search/search.routing.yml
+++ b/core/modules/search/search.routing.yml
@@ -36,7 +36,7 @@ search.enable:
     _controller: '\Drupal\search\Controller\SearchController::performOperation'
     op: 'enable'
   requirements:
-    _entity_access: 'search_page.update'
+    _entity_access: 'search_page.enable'
 
 search.disable:
   path: '/admin/config/search/settings/manage/{search_page}/disable'
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php b/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php
index a4d30c8..c2fc602 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Entity/ShortcutSet.php
@@ -20,7 +20,7 @@
  *   label = @Translation("Shortcut set"),
  *   controllers = {
  *     "storage" = "Drupal\shortcut\ShortcutSetStorageController",
- *     "access" = "Drupal\shortcut\ShortcutSetAccessController",
+ *     "access" = "Drupal\shortcut\ShortcutSetEntityAccessController",
  *     "list" = "Drupal\shortcut\ShortcutSetListController",
  *     "form" = {
  *       "default" = "Drupal\shortcut\ShortcutSetFormController",
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetAccessController.php b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetAccessController.php
index c60d52a..a25d7ac 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetAccessController.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutSetAccessController.php
@@ -2,19 +2,19 @@
 
 /**
  * @file
- * Contains \Drupal\shortcut\ShortcutSetAccessController.
+ * Contains \Drupal\shortcut\ShortcutSetEntityAccessController.
  */
 
 namespace Drupal\shortcut;
 
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityAccessController;
 use Drupal\Core\Session\AccountInterface;
 
 /**
  * Defines the access controller for the shortcut entity type.
  */
-class ShortcutSetAccessController extends EntityAccessController {
+class ShortcutSetEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/lib/Drupal/system/DateFormatAccessController.php b/core/modules/system/lib/Drupal/system/DateFormatAccessController.php
index a5483b6..e693138 100644
--- a/core/modules/system/lib/Drupal/system/DateFormatAccessController.php
+++ b/core/modules/system/lib/Drupal/system/DateFormatAccessController.php
@@ -2,19 +2,19 @@
 
 /**
  * @file
- * Contains \Drupal\system\DateFormatAccessController.
+ * Contains \Drupal\system\DateFormatEntityAccessController.
  */
 
 namespace Drupal\system;
 
-use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
 
 /**
  * Provides an access controller for date formats.
  */
-class DateFormatAccessController extends EntityAccessController {
+class DateFormatEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/system/lib/Drupal/system/Entity/DateFormat.php b/core/modules/system/lib/Drupal/system/Entity/DateFormat.php
index 0a1d494..3230484 100644
--- a/core/modules/system/lib/Drupal/system/Entity/DateFormat.php
+++ b/core/modules/system/lib/Drupal/system/Entity/DateFormat.php
@@ -19,7 +19,7 @@
  *   id = "date_format",
  *   label = @Translation("Date format"),
  *   controllers = {
- *     "access" = "Drupal\system\DateFormatAccessController",
+ *     "access" = "Drupal\system\DateFormatEntityAccessController",
  *     "list" = "Drupal\system\DateFormatListController",
  *     "form" = {
  *       "add" = "Drupal\system\Form\DateFormatAddForm",
diff --git a/core/modules/system/lib/Drupal/system/Entity/Menu.php b/core/modules/system/lib/Drupal/system/Entity/Menu.php
index 5466692..738990f 100644
--- a/core/modules/system/lib/Drupal/system/Entity/Menu.php
+++ b/core/modules/system/lib/Drupal/system/Entity/Menu.php
@@ -19,7 +19,7 @@
  *   id = "menu",
  *   label = @Translation("Menu"),
  *   controllers = {
- *     "access" = "Drupal\system\MenuAccessController"
+ *     "access" = "Drupal\system\MenuEntityAccessController"
  *   },
  *   config_prefix = "system.menu",
  *   admin_permission = "administer menu",
diff --git a/core/modules/system/lib/Drupal/system/MenuAccessController.php b/core/modules/system/lib/Drupal/system/MenuAccessController.php
index fe84368..fd01ba0 100644
--- a/core/modules/system/lib/Drupal/system/MenuAccessController.php
+++ b/core/modules/system/lib/Drupal/system/MenuAccessController.php
@@ -2,19 +2,19 @@
 
 /**
  * @file
- * Contains \Drupal\system\MenuAccessController.
+ * Contains \Drupal\system\MenuEntityAccessController.
  */
 
 namespace Drupal\system;
 
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
-use Drupal\Core\Entity\EntityAccessController;
 use Drupal\Core\Session\AccountInterface;
 
 /**
  * Defines the access controller for the menu entity type.
  */
-class MenuAccessController extends EntityAccessController {
+class MenuEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/user/lib/Drupal/user/Entity/Role.php b/core/modules/user/lib/Drupal/user/Entity/Role.php
index 71ac261..0e6d72e 100644
--- a/core/modules/user/lib/Drupal/user/Entity/Role.php
+++ b/core/modules/user/lib/Drupal/user/Entity/Role.php
@@ -20,7 +20,7 @@
  *   label = @Translation("Role"),
  *   controllers = {
  *     "storage" = "Drupal\user\RoleStorageController",
- *     "access" = "Drupal\user\RoleAccessController",
+ *     "access" = "Drupal\user\RoleEntityAccessController",
  *     "list" = "Drupal\user\RoleListController",
  *     "form" = {
  *       "default" = "Drupal\user\RoleFormController",
diff --git a/core/modules/user/lib/Drupal/user/RoleAccessController.php b/core/modules/user/lib/Drupal/user/RoleAccessController.php
index 0ab9ad8..6d96608 100644
--- a/core/modules/user/lib/Drupal/user/RoleAccessController.php
+++ b/core/modules/user/lib/Drupal/user/RoleAccessController.php
@@ -2,19 +2,19 @@
 
 /**
  * @file
- * Contains \Drupal\user\RoleAccessController.
+ * Contains \Drupal\user\RoleEntityAccessController.
  */
 
 namespace Drupal\user;
 
-use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Session\AccountInterface;
 
 /**
  * Defines the access controller for the user_role entity type.
  */
-class RoleAccessController extends EntityAccessController {
+class RoleEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views/lib/Drupal/views/Entity/View.php b/core/modules/views/lib/Drupal/views/Entity/View.php
index a5d9ea8..44bf70a 100644
--- a/core/modules/views/lib/Drupal/views/Entity/View.php
+++ b/core/modules/views/lib/Drupal/views/Entity/View.php
@@ -23,7 +23,7 @@
  *   label = @Translation("View"),
  *   controllers = {
  *     "storage" = "Drupal\views\ViewStorageController",
- *     "access" = "Drupal\views\ViewAccessController"
+ *     "access" = "Drupal\views\ViewEntityAccessController"
  *   },
  *   admin_permission = "administer views",
  *   config_prefix = "views.view",
diff --git a/core/modules/views/lib/Drupal/views/ViewAccessController.php b/core/modules/views/lib/Drupal/views/ViewAccessController.php
index e761af2..41a68c4 100644
--- a/core/modules/views/lib/Drupal/views/ViewAccessController.php
+++ b/core/modules/views/lib/Drupal/views/ViewAccessController.php
@@ -2,12 +2,12 @@
 
 /**
  * @file
- * Contains \Drupal\views\ViewAccessController.
+ * Contains \Drupal\views\ViewEntityAccessController.
  */
 
 namespace Drupal\views;
 
-use Drupal\Core\Entity\EntityAccessController;
+use Drupal\Core\Config\Entity\ConfigEntityAccessController;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Session\AccountInterface;
@@ -15,7 +15,7 @@
 /**
  * Defines the access controller for the view entity type.
  */
-class ViewAccessController extends EntityAccessController {
+class ViewEntityAccessController extends ConfigEntityAccessController {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/views_ui/views_ui.routing.yml b/core/modules/views_ui/views_ui.routing.yml
index ee6ad6c..3fbf1d5 100644
--- a/core/modules/views_ui/views_ui.routing.yml
+++ b/core/modules/views_ui/views_ui.routing.yml
@@ -52,7 +52,7 @@ views_ui.enable:
     _controller: '\Drupal\views_ui\Controller\ViewsUIController::ajaxOperation'
     op: enable
   requirements:
-    _permission: 'administer views'
+    _entity_access: view.enable
     _csrf_token: 'TRUE'
 
 views_ui.disable:
@@ -61,7 +61,7 @@ views_ui.disable:
     _controller: '\Drupal\views_ui\Controller\ViewsUIController::ajaxOperation'
     op: disable
   requirements:
-    _permission: 'administer views'
+    _entity_access: view.disable
     _csrf_token: 'TRUE'
 
 views_ui.clone:
