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?

Comments

weseze created an issue. See original summary.

batigolix’s picture

This 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.

sinn’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB

Looks like maintainers wanted to notify site administrator about wrong configuration. In your case this notification is excessive. See attached patch.

  • sinn committed bbfb259 on 8.x-1.x
    Issue #2931713 by sinn: Why do I need access to the default theme if I...
sinn’s picture

Status: Needs review » Fixed

> 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)."

Status: Fixed » Closed (fixed)

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