I have installed the module so I can give certain users access to edit a custom block type (block_content).
That's all they should be able to do. No need to add, delete blocks, no need to layout blocks, ... Just edit what I created and placed for them.
In order for this to work, I gave following permissions:
"Administer blocks" from the Drupal core block module. (this gives them the ability to administer all blocks, which is way to much)
"Manage blocks provided by block_content" from the block_permissions module. (this limits the above permission so they can only edit blocks of the type "block_content")
By not giving them permission to administer blocks on a theme I have successfully prevented those users from being able to change block layout on the theme. (would be nice if I could prevent them from deleting blocks also)
So why does my watchdog table get flooded with messages?:
"User ... has the administer block settings permission but no access to the default theme ..., this is required."
Is there any (technical) reason why I should give this permission?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | block_permissions-excessive_notification-2931713-3.patch | 1.15 KB | sinn |
Comments
Comment #2
batigolixThis is caused by a bug. It was reported here: #2826591: Notice about Undefined index 'hidden' in theme info
It contains a patch to fix the problem.
Comment #3
sinn commentedLooks like maintainers wanted to notify site administrator about wrong configuration. In your case this notification is excessive. See attached patch.
Comment #5
sinn commented> Is there any (technical) reason why I should give this permission?
Block layout page (admin/structure/block) shows blocks from the default theme so user has to have permission to administer blocks in the default theme to see this page. It works so by module's design.
> So why does my watchdog table get flooded with messages?: "User ... has the administer block settings permission but no access to the default theme ..., this is required."
I've removed this message. Drupal 9 in any case add access denied warning like: "Path: /admin/structure/block/. Drupal\Core\Http\Exception\CacheableAccessDeniedHttpException: The 'administer block settings for theme bartik' permission is required. in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 117 of /var/www/drupal9vm.com/web/core/lib/Drupal/Core/Routing/AccessAwareRouter.php)."