Needs work
Project:
Drupal core
Version:
main
Component:
layout_builder.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Mar 2019 at 20:43 UTC
Updated:
30 Dec 2025 at 08:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #10
benjifisherI think it would be disruptive to change things so that the current LB permission is no longer enough to create and edit inline blocks (of any type). If we were going to do that, we should have done it when the new block permissions were added, in 10.1.0. Now I think the right thing to do is to add a new permission that needs one of the more granular block permissions to be useful.
Currently, in
layout_builder.permissions.yml:I think we can tweak the description: change "the" to "all".
The new permission would be something like
In the description, I am trying to be consistent with the labels of some existing LB permissions, like "Content - Article: Configure layout overrides for content items that the user can edit".
Comment #11
_utsavsharma commentedTried to address the #10.
Comment #12
benjifisher@_utsavsharma :
Thanks for starting this issue.
We should keep the old permission and add a new one. The patch in #11 replaces the old permission with a new one.
Once we have the permission, we will have to update the access controls so that the permission does what it says. That will be the hard part of this issue.
We also need to expand the issue summary. So far, it is just a stub.
Comment #13
graber commentedNo point having 2 permissions ultimately since the old one will allow bypassing access of granular block permissions. I was thinking maybe a follow-up with an update hook in the next major to leave only 1 permission so site owners will not end up not having access unexpectedly until they update to that next major with a CR of course?
Comment #14
graber commentedAlso.. I'll work on it.
Comment #15
graber commentedComment #17
graber commentedAdded some initial work on this. Definitely needs more work.
Comment #18
graber commentedPassing to the first review and testing.
Comment #19
graber commentedThank you for checking this Alec! Included your remarks except those about catching exceptions. I think if any of those exceptions happen, it indicates a serious issue with the project that should be caught on a local / dev environment or as early as possible in any case (invalid custom code or data corruption) and not allowed to stay there much longer and eventually be noticed resulting in a completely different bug.
Just to be sure, I checked other calls of those methods in the module - they are not wrapped in a try-catch anywhere so those exceptions would be thrown elsewhere anyway. Setting those threads as resolved.
Comment #20
graber commentedSingle test fail completely unrelated:
Drupal\Tests\ckeditor5\FunctionalJavascript\MediaLinkabilityTest. OK, all green again.Comment #21
plach@Graber
Could you please add some details to the IS Problems/Motivations section?
Comment #22
graber commentedComment #23
graber commentedThank you for checking this @plach, all resolved, if you have concerns about the Kernel test, please provide more details, I don't think we need to go for a functional in such a simple case and at a big performance cost. Layout Builder tests are very heavy already :(
Comment #24
plachLooks good to me, I'll manually test this for a while and then report back.
Comment #25
smustgrave commentedIssue summary appears to have been updated previously.
Tested locally the new permission and an editor role. Things appear to be working as expected but will leave in review for more eyes +1
Comment #26
alecsmrekar commentedMost entity types rely on an "update" operation instead of the "edit" operation. Paragraphs will check the "update" operation on it's parent entity. If the parent entity is a block, we'll need to convert "update" to "edit".
Here's a proposal for changing getBundlePermission:
Comment #27
smustgrave commentedTo try out #26
Comment #28
graber commented@alecsmrekar feel free to commit that, it'll be your change after all :)
Comment #32
dburiak commentedCombined the changes from MR!6125 and #26 to MR!8743.
The MR!6125 is hidden as redundant.
Comment #33
smustgrave commentedIf we are changing solution issue summary should be updated.
6125 was passing the pipeline but new MR is not so moving to NW for that.
Comment #34
dburiak commentedThe #26 doesn't change the solution; it is just an adjustment.
The MR!8743 is updated to pass the code styles check. Please review.
Comment #35
smustgrave commented@dburiak mind rebasing
Comment #36
matthiasm11 commentedWorks fine on D10. Adding a dedicated patch file for D10.
The merge request should still be rebased for D11.
Comment #37
dburiak commentedThe MR is rebased. Review is needed.
Comment #38
dburiak commentedComment #39
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #40
dburiak commentedThe code style is fixed.
Comment #41
dburiak commentedComment #42
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #44
matthiasm11 commentedRebasing MR8743 gave too much errors, fixing it became a lot of work.
I've created a clean new merge request, starting from a fresh 11.x.
Attached a static D11 patch file.
Comment #46
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #47
dench0Comment #48
dench011.3.1 patch
Comment #49
dench0Fixed D11.3.1 patch
Comment #50
quietone commentedHi, in Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies. Thanks.