function layout_builder_post_update_update_permissions
Add new custom block permission to all roles with 'configure any layout'.
File
-
core/
modules/ layout_builder/ layout_builder.post_update.php, line 185
Code
function layout_builder_post_update_update_permissions() {
foreach (Role::loadMultiple() as $role) {
if ($role->hasPermission('configure any layout')) {
$role->grantPermission('create and edit custom blocks')
->save();
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.