diff --git a/core/modules/edit/edit.info b/core/modules/edit/edit.info index 3328601..5298534 100644 --- a/core/modules/edit/edit.info +++ b/core/modules/edit/edit.info @@ -4,4 +4,3 @@ package = Core core = 8.x dependencies[] = field -dependencies[] = toolbar diff --git a/core/modules/edit/edit.module b/core/modules/edit/edit.module index 5159384..ecb498e 100644 --- a/core/modules/edit/edit.module +++ b/core/modules/edit/edit.module @@ -40,10 +40,6 @@ function edit_permission() { * Implements hook_toolbar(). */ function edit_toolbar() { - if (path_is_admin(current_path())) { - return; - } - $tab['edit'] = array( 'tab' => array( 'title' => t('Edit'), diff --git a/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php b/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php index 82726c3..c98901d 100644 --- a/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php +++ b/core/modules/edit/lib/Drupal/edit/Access/EditEntityFieldAccessCheck.php @@ -42,8 +42,16 @@ public function access(Route $route, Request $request) { */ public function accessEditEntityField(EntityInterface $entity, $field_name) { $entity_type = $entity->entityType(); + // @todo Generalize to all entity types: http://drupal.org/node/1839516. - return ($entity_type == 'node' && node_access('update', $entity) && field_access('edit', $field_name, $entity_type, $entity)); + $entity_access = ($entity_type == 'node' && node_access('update', $entity)); + + // @todo Implement revision and log message handling: + // http://drupal.org/node/1678002. Until then, disallow in-place editing + // of node types that auto-revision by default. + $entity_access = $entity_access && !in_array('revision', variable_get('node_options_' . $entity->bundle(), array())); + + return ($entity_access && field_access('edit', $field_name, $entity_type, $entity)); } /**