Skip to content
Snippets Groups Projects

Issue #3471460 by ahmad khader: Fix users having access to the layout builder on entities regardless of whether the layout is enabled

Merged Issue #3471460 by ahmad khader: Fix users having access to the layout builder on entities regardless of whether the layout is enabled
Merged Rajab Natshah requested to merge issue/layout_builder_perms-3471460:3471460-2-1-x into 2.1.x
1 file
+ 6
0
Compare changes
  • Side-by-side
  • Inline
@@ -48,6 +48,12 @@ class OverridesSectionStorage extends OverridesSectionStorageBase {
$result = $any_access->orIf($own_content_access);
// Access also depends on the default being enabled.
$result = $result->andIf($this->getDefaultSectionStorage()->access($operation, $account, TRUE));
// Access also depends on the default layout being overridable.
$result = $result->andIf(AccessResult::allowedIf($this->getDefaultSectionStorage()->isOverridable())->addCacheableDependency($this->getDefaultSectionStorage()));
return $return_as_object ? $result : $result->isAllowed();
}
Loading