Steps to reproduce:

  1. Add a block to the dashboard.
  2. Configure the block and limit visibility by role
  3. Load dashboard as a role that was not selected as having permission to view the block
  4. Empty block appears on dashboard instead of being completely invisible

I want to customize the dashboard to have different blocks for different roles as their responsibilities are completely siloed. It isn't helpful to have a slew of "empty" blocks cluttering the dashboard for different roles.

This should be consistent with the way blocks work everywhere else in Drupal and not render period.

Comments

ankur’s picture

Looks like the ticket for the original implementation of this took place in #544360: D7UX dashboard module. The idea of outputting "(empty)" begins in comments #149 and #150 in that issue.

I agree, however, that the presentation of an empty block should be different from the presentation of a block for which the current user does not have access, in that the block should not be displayed at all for the latter situation.

Currently, the code in function dashboard_page_build() doesn't make this distinction. I'm wondering if it should do a drupal_alter('block_list', ...), which is how the access control for blocks is enforced in the block module when blocks are loaded and rendered elsewhere.

marcingy’s picture