[drupal-devel] [feature] Add configuration option to show blocks
only on pages of certain node type
Andre Molnar
mcsparkerton at yahoo.co.uk
Tue Jan 25 06:56:09 UTC 2005
Dries wrote:
> On a related note, there is also an interest in being able to display
> blocks on a role-base so if time permits, you might want to introduce a
> 'block.roles' column too. ;-)
I gave this idea a moment of thought. It would be easy enough to
introduce 'display block only for the following roles' - but I'm not
entirely sure how one would go about setting permissions for this.
I don't think that just anyone allowed to 'administer blocks' should be
given the power to decide who (what roles) gets to see blocks. So I
figure that you would have to grant permissions to a user to be able to
see that specific configuration option within the block configuration page.
So, being a complete drupal permissions newbie, I suppose my question is
- what would be the best way to go about doing this? Would adding a
local task to the configuration page for this specific setting be the
way to go? And add a perm for 'administer block visibility by role' (or
something similar) and control access to the local task based on that
permission?
Let me know if that sounds right - or point me in a better direction and
I will see what I can do about baking a patch for this feature. (No
better way to learn about something than writing some code for it ;-))
andre
More information about the drupal-devel
mailing list