Currently if you make a block available to a homebox but this block isn't available to all users, when those users that don't have access to it click on 'Add a block' they will see the block title there but clicking on it will do nothing (except for causing the page to reload). It would be better if these blocks didn't show up at all.

Comments

brianV’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev

Bumping version since 6.x-2.x is no longer being developed.

pbeakley’s picture

+subscribing.

rocnhorse’s picture

How are defining which users have access to a block. If through roles does this issue fix it?
http://drupal.org/node/1189656

jtolj’s picture

Version: 6.x-3.x-dev » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new894 bytes

Bump to 7.x... Here is a patch against 7.x-2.x-dev that uses the built-in function _homebox_can_view_block() to check access before building the "Add a block" list.

Anonymous’s picture

StatusFileSize
new891 bytes

jtolj, thanks for the patch! We're using 6.x-3.0-beta5, so I adapted your patch for the earlier version. Only lightly tested, but this appears to work okay.

slybud’s picture

Hi guys,

I've just re-rolled the patch for the 7.x-2.0-beta6 version because this portion of code has slightly changed

I've tested it on a working project and it works fine !

Sorry for the svn patch format, I don't have git on this project right now

chaby’s picture

StatusFileSize
new1.16 KB

Hi

up ! one year now... and looks like RTBC (didn't change issue status)

just reroll 7.x-2.x but for git !

thanks everyone

chaby’s picture

up this issue just to inform that currently, using _homebox_can_view_block could be used with this patch to improve a little performance...

mgifford’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Tested that on simplytest.me with an authenticated user with limited roles. Seemed to work just fine.

  • drumm committed 830093e on 7.x-2.x authored by chaby
    Issue #988094 Don't show blocks user doesn't have access to in 'Add a...
drumm’s picture

Status: Reviewed & tested by the community » Fixed

Looks good, committed.

Status: Fixed » Closed (fixed)

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