Members fund testing for the Drupal project. Drupal Association Learn more

Comments

vijaycs85 created an issue. See original summary.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

arshadcn’s picture

Assigned: Unassigned » arshadcn

Working on this.

arshadcn’s picture

Wim Leers’s picture

Status: Active » Needs review

I think we can let testbot check it, no?

Status: Needs review » Needs work

The last submitted patch, 4: entityresource_provide-2835845-4-fail.patch, failed testing.

arshadcn’s picture

Thanks @Wim Leers.

As a result I believe we can't really use \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testGet to test BlockContentResourceTestBase since we are seeing 200 everywhere?

Wim Leers’s picture

We're not seeing 200 everywhere. From the test output:

Drupal\Core\Entity\EntityStorageException: 'block_content_type' entity with ID 'basic' already exists.

I think the solution is to remove this:

+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentResourceTestBase.php
@@ -0,0 +1,147 @@
+    $block_content_type = BlockContentType::create(array(
+      'id' => 'basic',
+      'label' => 'basic',
+      'revision' => FALSE
+    ));
+    $block_content_type->save();

Also, the whole point is that we should not be seeing 200 everywhere. The tests are fine, what we need to fix is BlockAccessControlHandler. For that, we have #2851905: BlockContent entities are accessible to anonymous users when a REST endpoint is enabled. I think it makes sense to merge this patch with #2851905: BlockContent entities are accessible to anonymous users when a REST endpoint is enabled, i.e. to mark this as a duplicate of #2851905.

arshadcn’s picture

"Everywhere" was the wrong word choice here :)

I meant we're seeing 200 where 403 is expected in \Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase::testGet for BlockContentJsonAnonTest

Wim Leers’s picture

Yep, that makes sense :)

vaplas’s picture

Added hal tests + update #4 patch. Now, if apply change:

+++ b/core/modules/block_content/src/BlockContentAccessControlHandler.php
@@ -19,7 +19,7 @@ class BlockContentAccessControlHandler extends EntityAccessControlHandler {
    */
   protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
     if ($operation === 'view') {
-      return AccessResult::allowed();
+      return AccessResult::allowedIfHasPermission($account, 'administer blocks');

Then GET will passed. We also have some problem with access in Menu and View tests.

But looks like BlockContent has additional problem. Example, when POST:

# EntityResourceTestBase.php:689
Failed asserting that 422 is identical to 403.

# $response->getBody()
{"message":"Could not determine entity type bundle: 'type' field is missing."}

This message we get from FieldableEntityNormalizerTrait::extractBundleData.

Perhaps this is due to the fact that we get target_id instead object:
{"id":[{"value":1}],"info":{"1":{"value":"Second Title"}}}
But this is my brain limit for now :)

Status: Needs review » Needs work

The last submitted patch, 11: entityresource_provide-2835845-11.patch, failed testing.

arshadcn’s picture

Thanks for your help @vaplas. See this related issue #2820315: Blocks' 'view' operation is interpreted as "render on page" instead of "read this config entity" about the access.

vaplas’s picture

Status: Needs work » Needs review
FileSize
12.22 KB

Thanks for your answer about access @arshadcn! I will follow this issue.

But looks like BlockContent has additional problem.

LOL!

Quick review new changes:

+++ b/core/modules/block_content/src/BlockContentAccessControlHandler.php
   protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
     if ($operation === 'view') {
+      return AccessResult::allowedIfHasPermission($account, 'administer blocks');
       return AccessResult::allowed();

Only to demonstrate that the rest tests pass.

   protected function getNormalizedPostEntity() {
...
+          'value' => 'Llama & ' . $this->randomMachineName(),

To prevent collisions in the POST test ('info' must be unique).

   protected static $patchProtectedFieldNames = [
-    'id',
-    'revision_id',

To prevent problems in the PATCH test (not read-only).

+++ b/core/modules/rest/tests/src/Functional/EntityResource/BlockContent/BlockContentResourceTestBase.php
   protected function createEntity() {
-    $block_content_type = BlockContentType::create([
+    if (!BlockContentType::load('basic')) {

To prevent collisions in the DELETE test ('basic' already exists otherwise)

vaplas’s picture

Status: Needs review » Needs work

The last submitted patch, 14: entityresource_provide-2835845-14.patch, failed testing.

vaplas’s picture

   protected function getNormalizedPostEntity() {
...
+          'value' => 'Llama & ' . $this->randomMachineName(),

Looks like after #2843754: EntityResource: Provide comprehensive test coverage for Feed entity we can make test without a random-value trick.

Also maybe we can use 'access content' like in #2843772: EntityResource: Provide comprehensive test coverage for DateFormat entity? I already pushed this idea into #2843783: EntityResource: Provide comprehensive test coverage for Menu entity and #2843758: EntityResource: Remove ViewAccessControlHandler and provide comprehensive test coverage for View entity.

arshadcn’s picture

Thanks for the update @vaplas. I'll send a new patch.

Wim Leers’s picture

Title: EntityResource: Provide comprehensive test coverage for BlockContent entity » [PP-1] EntityResource: Provide comprehensive test coverage for BlockContent entity
Status: Needs work » Postponed
Wim Leers’s picture

Wim Leers’s picture

Title: [PP-1] EntityResource: Provide comprehensive test coverage for BlockContent entity » EntityResource: Provide comprehensive test coverage for BlockContent entity
Status: Postponed » Needs work

#2843754: EntityResource: Provide comprehensive test coverage for Feed entity landed, this is now unblocked!

Let's get this rerolled, see #17.

Wim Leers’s picture

vaplas’s picture

Status: Needs work » Needs review
FileSize
10.97 KB
3.8 KB
+++ b/core/modules/block_content/src/BlockContentAccessControlHandler.php
@@ -19,6 +19,7 @@ class BlockContentAccessControlHandler extends EntityAccessControlHandler {
   protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
     if ($operation === 'view') {
+      return AccessResult::allowedIfHasPermission($account, 'administer blocks');
       return AccessResult::allowed();
     }

It still here (for pass rest tests). It will cause a fails in other tests. It should be replaced. But what to use instead?

We haven't 'access block content' permission. And looks like we refused the 'access content' ('view content') in #1919928: Resolve usage of 'view content' permission in modules other than Node.

Also, there is another problem (block_content.routing.yml):

entity.block_content.canonical:
  path: '/block/{block_content}'
  defaults:
    _entity_form: 'block_content.edit'
  options:
    _admin_route: TRUE
  requirements:
    _entity_access: 'block_content.update'
    block_content: \d+

As result GET requests in EntityResourceTestBase::testGet() (319 line) receives message for 'update' operation instead of 'view'.

We already solved a similar problem in #2843750: EntityResource: Provide comprehensive test coverage for Shortcut entity through a more general the "reason" message for denying access. (Now this problem is not visible, because GET has 'administer blocks' permission).

Status: Needs review » Needs work

The last submitted patch, 23: entityresource_provide-2835845-23.patch, failed testing. View results

Wim Leers’s picture

+++ b/core/modules/block_content/src/BlockContentAccessControlHandler.php
@@ -19,6 +19,7 @@ class BlockContentAccessControlHandler extends EntityAccessControlHandler {
+      return AccessResult::allowedIfHasPermission($account, 'administer blocks');

This is … a huge problem. Because \Drupal\block_content\Plugin\Block\BlockContentBlock::blockAccess() does this:

  protected function blockAccess(AccountInterface $account) {
    if ($this->getEntity()) {
      return $this->getEntity()->access('view', $account, TRUE);
    }
    return AccessResult::forbidden();
  }

Therefore this change causes "custom blocks (block_content blocks) to only be visible for users that have the administer blocks permission.

That's obviously a massive BC break.

It's closely related to #2820315: Blocks' 'view' operation is interpreted as "render on page" instead of "read this config entity".

I think the only acceptable solution here is to require the access content permission, per #2870018: Should the 'access content' permission be used to control access to viewing configuration entities via REST.

vaplas’s picture

Version: 8.3.x-dev » 8.4.x-dev

@Wim Leers, thanks for the explanation, totally agree!

vaplas’s picture

Status: Needs review » Needs work

The last submitted patch, 27: entityresource_provide-2835845-27.patch, failed testing. View results

vaplas’s picture

Status: Needs work » Needs review
FileSize
17.9 KB
2.84 KB

Status: Needs review » Needs work

The last submitted patch, 29: entityresource_provide-2835845-29.patch, failed testing. View results

vaplas’s picture

Status: Needs work » Needs review
FileSize
17.94 KB
616 bytes
Berdir’s picture

+++ b/core/modules/block_content/src/BlockContentAccessControlHandler.php
@@ -19,9 +19,15 @@ class BlockContentAccessControlHandler extends EntityAccessControlHandler {
   protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
     if ($operation === 'view') {
-      return AccessResult::allowed();
+      $result = AccessResult::allowedIfHasPermission($account, 'access content');
     }

Same as in the file issue, this introduces a hidden dependency on the node module and I can definitely imagine situations here where this would break stuff.

Simple example. A site does not give access content to anon/auth/some users but they can see blocks that explain that they need to e.g. register to be able to see the content.

vaplas’s picture

Hm.. good case! Looks like this is a very real situation. How about creating a new 'access block content' permission?

Berdir’s picture

I don't know. Many of our entity types are designed for specific use cases, in case of block_content, it's being displayed in blocks. They don't need view access checks there because that's what block visibility conditions are used for. Except we can't reverse-check them for REST because we don't know the connection and there could also be different blocks with different logic.

What I mean is that a if a user creates a custom block and displays it with visibility condition so that only admins can see it, would he except that to be respected in REST as well? :)

I feel like we're trying to make a change here for the only purpose of being able to test it with our standard framework. From Wim very early in this issue:

> Also, the whole point is that we should not be seeing 200 everywhere.

But why not? Just so our tests are happy? Tests have to follow the actual use case, not the other way round :) Either we actually respect the real way acess/visibility is done for block_content (which I don't think we can, as we would actually need to access block entities and check access for those, which means we need to respect things like the URL context) or we shouldn't bother at all.

vaplas’s picture

@Berdir, thanks you for good explanation! It seems we should postpone this issue again (like #2870018: Should the 'access content' permission be used to control access to viewing configuration entities via REST). Although I do not fully understand why you so you suspect the tests so much, instead of the drawbacks of the architecture of drupal?

REST tests is a nice Stress Test for the system on the possibility of an API-First availability. If we can not control access through permissions, is this not the problem that needs to be addressed, rather than abandoning testing it?)

Rest tests are filled with methods that allow to adjust to the current system, where possible. But this logic seems to be one of the fundamental.

In any case, discussion is always better than ignoring, so thank you very much!

Berdir’s picture

I have to warn you, I've already had quite a few discussions with Wim and others on REST and API First and so on. And I'm somewhat critical of the whole REST-for-decoupled sites approach as you'll see in a moment. This is your last chance to hide :)

This issue title could be translated to "Lets blindly write test coverage for block_content following the general assumptions of ResourceTestBase."

But there is a reason we have different entity types, they all have their things they are special about and specific use cases, if not, we could just make everything nodes.

So lets take a step back and figure out what exactly API/REST access means for block_content entities. IMHO, there are different major use cases that come up:

1. Data synchronisation between sites, where you want the raw data.
This is IMHO the use case that rest.module was written for and works (worked*) quite well for that. But in such a case, you likely want to have direct access to REST limited to your server processes and not everyone in the internet. IMHO that's why rest.module used to define special rest-specific permissions that we removed. So, it doesn't really matter for most sites if viewing those entities over REST requires no permission or access content, both are actually too open and we kind of broke that use case already a while ago.

2. Decoupled sites that want to show content from those blocks to users, requested from normal/anon users
I think whether or not your users have access content is pretty irrelevant for deciding if a block_content entity should be shown or not. What matters is the block visibility settings in case of standard block placement. But how do you even know which blocks you should display? On normal Drupal sites, that's done through a block placement, with URL/language/role/node type.. visibility rules. What you really need IMHO for this use case is integration with block entities and possibly even a service that basically exposes BlockRepository and gives you a way to get all blocks that should be displayed for a certain URL/User and their content. As Wim said, this is related to #2820315: Blocks' 'view' operation is interpreted as "render on page" instead of "read this config entity" (there is nothing config entity or block specific about that issue actually, that applies to all entities). I have actually no idea how decoupled sites do that today, but my guess is that they don't bother with the block system at all and just do all of that on the client side?

So by making this change and adding those tests, we actually don't get closer to either use case as far as I see? Tests should implement the actual use cases and verify those work, Assumptions in a test base class shouldn't be a justification to making changes to something that also affects things outside of REST. Also, all of those REST for $entity_type test groups result in a considerable test overhead that we also shouldn't blindly add to every single entity type we have without asking ourself what the benefit is.

*: I'm a bit worried that by trying to make REST better for decoupled sites, we make it worse for the original use case and end up with something that can't do either of those two use cases well.

Wim Leers’s picture

Thanks for your excellent comment @Berdir! :)

  1. I don't think we're making it work worse. Also, the permission changes that we made at #2664780: Remove REST's resource- and verb-specific permissions for EntityResource, but provide BC and document why it's necessary for other resources were A) approved by REST maintainer @klausi, B) "sync" was mentioned zero times on that issue, C) the issue (and the IS) points to comments at the time where the REST module was being added, where it's clearly being stated that those permissions were a temporary work-around.

    So I think that some group of people saw REST as primarily developed for sync use cases, others saw it for the general decoupled use case. That's an unfortunate misunderstanding, or lack of shared agreement/vision. I'm not sure how to change that now :(

    So, it doesn't really matter for most sites if viewing those entities over REST requires no permission or access content, both are actually too open and we kind of broke that use case already a while ago.

    Do you mean that you think it's okay for block_content content entities to be legible by the entire world? But then I'm still not sure what you mean by both are actually too open and we kind of broke that use case a while ago — could you clarify those?

  2. Block visibility settings being arguably more important: very interesting! I've got a few thoughts:
    block visibility conditions live in block config entities ("Placed blocks"), not block_content content entities — so theoretically irrelevant on this issue, but I agree that in practice it's closely enough related to be relevant.
  3. I think that for many decoupled use cases, block visibility conditions don't matter, because block placement is often controlled in template/JS code. Only the more advanced decoupled sites need block placement and therefore visibility conditions.
  4. OTOH, I do think that just about every visibility condition can actually be evaluated on the client side, which means that there is no need for a BlockRepository-like service on the client side.

RE: #2820315: Blocks' 'view' operation is interpreted as "render on page" instead of "read this config entity" actually applying to all entity types — I can see why you'd interpret it that way, but I think that loses very important nuance. There's a key difference IMHO: nodes, comments, users, then view == "read the entity" == "render on page" (because the rendered representation is equivalent with being able to read all fields). But in the case of block entities (config entities), what's actually happening is not rendering the data stored in that entity — it's interpreting that data to render the associated block plugin in a particular place on the page. That's what makes block config entities special in this way.

So by making this change and adding those tests, we actually don't get closer to either use case as far as I see?

What this patch is doing from my POV:

  1. it is not changing anything about use case 1 (data sync), except making it safer — because nothing in the normalization is being modified
  2. it is making use case 2 safer

Also, all of those REST for $entity_type test groups result in a considerable test overhead that we also shouldn't blindly add to every single entity type we have without asking ourself what the benefit is.

The benefit is that we

  1. A) know that every entity type actually is "API-First" — it's accessible via an API. Drupal 8 shipped claiming that, but as the many many dozens of bugfixes over the past year have proven: it does not remotely work for all entity types
  2. B) know when we break something — the test coverage that was added in Q4 2016 and has been growing since has already prevented many regressions

Let's continue in a constructive manner. Can you explain how this patch is negatively impacting the data sync use case? I really would love to understand that better.

Berdir’s picture

Do you mean that you think it's okay for block_content content entities to be legible by the entire world? But then I'm still not sure what you mean by both are actually too open and we kind of broke that use case a while ago — could you clarify those?

In many ways, block_content is like a backend entity that is not viewed directly like a node for example. As you said yourself, the block configs with their (visibility) configuration are the interaction point to the site, the block_content entity just provides the content inside.

For the sync use case, what you want is problably a list of all block_content entities and being able to fetch the complete raw data, not a formatted output. But that's not something that you want to make public to anyone, just your sync user/role, because normal visitors should not be able to fetch the raw data. Right now, there is no permission, which means it's not possible without using the deprecated BC option. This adds the "access content" permission, which does introduce certain problems, like breaking valid use cases where users are allowed to see blocks but not nodes. But it's still not safe enough for the data sync use case.

I didn't know that the permissions still exist as a BC fallback. Maybe we should simply discuss (in a separate issue obviously) to un-deprecate that setting and make it an official feature, that by default is off, then we already have much better protection for data sync use cases?

Block visibility settings being arguably more important: very interesting! I've got a few thoughts:
block visibility conditions live in block config entities ("Placed blocks"), not block_content content entities — so theoretically irrelevant on this issue, but I agree that in practice it's closely enough related to be relevant.

Yes, aware of that problem, which is why block_content is kind of a backend-thing that doesn't have its own access control as written above, I think I also mentioned the in a decoupled site, you might want to expose block entities and not block_content.

I think that for many decoupled use cases, block visibility conditions don't matter, because block placement is often controlled in template/JS code. Only the more advanced decoupled sites need block placement and therefore visibility conditions.

That cames back to my note that I actually have no clue how a decoupled site is handling blocks. If they don't care about block visibility (and block placement), then how do they know which block_content entities they need to load and display? As I wrote, unlike node, you never go to block_content/1 and they are not shown in lists based on references/type. block placement, block theme and block visibility configuration is the only thing that defines where they show up.

The only thing I can think of when not using those things is that you hardcode UUID's in the frontend and then fetch their data, so it's kind of configurable for editors. But then you don't really need block_content entities, you could do the same with nodes or terms or a custom entity type. This is IMHO again the conflict between We-Want-Generic-Always-Same-REST-API-For-All-Entities vs. the fact that different entity types are not the same thing and work differently, otherwise we would not need to bother with even having them and everything can be done with nodes :)

OTOH, I do think that just about every visibility condition can actually be evaluated on the client side, which means that there is no need for a BlockRepository-like service on the client side.

That could likely be done, but is that secure? If I configure role-based visibility conditions in a block (or in a view for example) then I would expect that really only those users can see that content and it's not always sent out and evaluated client side?

it is not changing anything about use case 1 (data sync), except making it safer — because nothing in the normalization is being modified
[...]
Let's continue in a constructive manner. Can you explain how this patch is negatively impacting the data sync use case? I really would love to understand that better.

I might have been a bit unclear on that. Yes, as I wrote above, this issue doesn't break use case 1, I meant that already kind of happened before like in the permission issue. But I also don't think it really makes it safer, as outlined above, on most sites, anonymous users have access content, which means their raw block_entity data is wide open whether we add the permission or not (just like node, just that the expectation of users might be different due to block visibility configuration).

it is making use case 2 safer

How exactly? I think it just breaks certain use cases. If you have a site where anonymous users have access content, then it makes zero difference and is not safer in any way. But if your site is different and anon users can't see the content, then I can totally imagine that you have put blocks on your page that are visibile to anonymous where you for example explain how to sign up. And by adding the permission check we don't make their site safer, we break it, because now that block is gone. Not just in REST, they don't even need to have that enabled, always, for everyone. So IMHO, adding the permission check here is a BC break.

My recommendation: Adjust the tests accordingly to not check for an access denied message, because block_content doesn't have that. And maye open a separate issue to make sense of blocks, block_content on decoupled sites, as a start, collect information of how developers are doing that now/what they need/how they think it should work. And then figure out a solution for that instead of trying to press everything into the One-Size-Fits-All-REST-Test.

PS: I'll respond to the part about #2820315: Blocks' 'view' operation is interpreted as "render on page" instead of "read this config entity" in that issue.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Wim Leers’s picture

#2820848: Make BlockContent entities publishable landed.

In #32 we started discussing whether relying on the access content permission is okay or not. For the general problem of modules other than node using that permission, we now have #2907121: Move 'access content' permission to system module. And to improve the access handling of blocks, we have #2820315: Blocks' 'view' operation is interpreted as "render on page" instead of "read this config entity".

#2820848: Make BlockContent entities publishable has given us a way forward here, allowing us not to need to change block's access control logic. In other words: tighter scope.

Let's finally get this done!

Wim Leers’s picture

Assigned: Wim Leers » Unassigned
Status: Needs work » Needs review
FileSize
8.36 KB
11.16 KB

I removed the changes to BlockContentAccessControlHandler from the patch, because it conflicted heavily with changes in HEAD. No more changes are being made to that code.

The interdiff reflects all changes except those to BlockContentAccessControlHandler, which in the last patch (#31) was being modified, and is now no longer being modified. That also explains the size of the interdiff: many of the tests that needed to be updated due to the access control changes now no longer need to be updated!

Berdir’s picture

Status: Needs review » Reviewed & tested by the community

Work for me assuming the tests pass, glad we found a solution we can agree on here ;) Doesn't solve all the fun things we started discussing but we can't solve all the problems at once.

Wim Leers’s picture

❤️

Doesn't solve all the fun things we started discussing but we can't solve all the problems at once.

Exactly!

Looking back on this issue, the scope was simply too big! I should've seen that sooner, but I didn't want to see it, because it'd mean blocking this on something far more complex. My apologies.

effulgentsia’s picture

Status: Reviewed & tested by the community » Needs review
+class BlockContentHalJsonBasicAuthTest extends BlockContentHalJsonAnonTest {
+class BlockContentHalJsonCookieTest extends BlockContentHalJsonAnonTest {

Wouldn't a BlockContentHalJsonTestBase make more sense? Looks like in HEAD, we have both patterns (e.g., we have a CommentHalJsonTestBase but not a NodeHalJsonTestBase), but for anything new we add, let's pick a pattern we like and stick to it.

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

This is the pattern used most widely already.

We can still change it later if we want. These are just tests.

IIRC Comment is the only exception (in typing this on my phone).

Wim Leers’s picture

The exceptions are: Comment, Feed and Item. Those 3 have a *HalJsonTestBase class. All others extend the *HalJsonAnonTest class.

That makes for dozens versus 3, so this is definitely the most widely used pattern.

effulgentsia’s picture

Adding review credit to @Berdir.

  • effulgentsia committed 301152f on 8.5.x
    Issue #2835845 by vaplas, Wim Leers, arshadcn, Berdir: EntityResource:...
effulgentsia’s picture

Version: 8.5.x-dev » 8.4.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

All others extend the *HalJsonAnonTest class...That makes for dozens versus 3

class ActionHalJsonBasicAuthTest extends ActionResourceTestBase {
class BaseFieldOverrideHalJsonBasicAuthTest extends BaseFieldOverrideResourceTestBase {
class BlockHalJsonBasicAuthTest extends BlockResourceTestBase {
class BlockContentTypeHalJsonBasicAuthTest extends BlockContentTypeResourceTestBase {
... (and many more)

A basic auth test extending an anon test looks like a much rarer pattern to me. But we can leave consistency (in whichever direction we choose to apply it) for a followup, so I pushed #41 to 8.5.x.

As this is only test coverage, it seems like it would be a good addition to 8.4 as well, but #41 shows failures for that, so setting this to "Patch (to be ported)".

Wim Leers’s picture

Version: 8.4.x-dev » 8.5.x-dev
Status: Patch (to be ported) » Fixed

#2820848: Make BlockContent entities publishable only landed in 8.5.x, and per #40, we need that to be able to proceed here. Once the super tricky #2820315: Blocks' 'view' operation is interpreted as "render on page" instead of "read this config entity" is solved, this could theoretically be committed to 8.4.x, but in practice that is unlikely to happen.

Therefore, this is only realistically committable to 8.5.x, therefore marking this fixed :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.