Needs review
Project:
Menu Inject Block
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jun 2013 at 15:35 UTC
Updated:
23 Dec 2014 at 20:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fonant commentedOK, patch that works for me attached.
The new code queries the blocks_roles table to see if there are per-role access restrictions on the block, and if there are for the current user then it doesn't render the block.
The query is similar to the query in block_list() in blocks.module, but without checking that the block is enabled (as blocks to be injected into menus may not be enabled anywhere else, and the menu item is explicitly asking for them anyway).
Comment #2
fonant commentedComment #3
petermallett commentedI wasn't sure how to get this patch to apply, so I remade it by hand with git with a few minor tweaks, posting here for documentation and committing on the 6.x-1.x branch
Comment #5
petermallett commentedCommitted to the 6.x-1.x branch, updating the issue and moving back to Needs work as this issue is present for D7 as well
Comment #6
petermallett commentedImplemented a role-based visibility check in the d7 branch.