diff -u b/core/modules/field/src/FieldConfigAccessControlHandler.php b/core/modules/field/src/FieldConfigAccessControlHandler.php --- b/core/modules/field/src/FieldConfigAccessControlHandler.php +++ b/core/modules/field/src/FieldConfigAccessControlHandler.php @@ -23,7 +23,8 @@ if ($operation === 'delete') { if ($storage->isLocked()) { return AccessResult::forbidden()->addCacheableDependency($storage); - } else { + } + else { return AccessResult::allowedIfHasPermission($account, 'administer ' . $entity->getTargetEntityTypeId() . ' fields')->addCacheableDependency($entity); } } diff -u b/core/modules/field_ui/src/FieldConfigListBuilder.php b/core/modules/field_ui/src/FieldConfigListBuilder.php --- b/core/modules/field_ui/src/FieldConfigListBuilder.php +++ b/core/modules/field_ui/src/FieldConfigListBuilder.php @@ -154,9 +154,8 @@ ], ]; - // If user does not have permission to edit the field, - // change the link into text. - if ($field_config->access('update') === FALSE) { + // If the field is locked turn the field widget link into text. + if ($field_storage->isLocked()) { $row['data']['field_type'] = $row['data']['field_type']['data']['#title']; } only in patch2: unchanged: --- a/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php +++ b/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php @@ -661,6 +661,8 @@ public function testLockedField() { $this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields'); $locked = $this->xpath('//tr[@id=:field_name]/td[4]', [':field_name' => $field_name]); $this->assertSame('Locked', $locked[0]->getHtml(), 'Field is marked as Locked in the UI'); + $field_link = $this->xpath('//tr[@id=:field_name]/td[3]', [':field_name' => $field_name]); + $this->assertSame('Test field', $field_link[0]->getHtml(), 'Field is marked as Locked in the UI'); $this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/node.' . $this->contentType . '.' . $field_name . '/delete'); $this->assertSession()->statusCodeEquals(403); }