The most straightforward way to restrict any block in Drupal is to configure it through the block's control panel.
The following explains how to restrict a block based on a user's role:
- Go to Admin menu > Site building > Blocks.
- Locate the name of the block you wish to apply a role restriction on.
- Click that block's configure link to open it's configuration panel.
- Once inside the configuration panel, scroll down to the Role Specific Visibility Settings fieldset.
- Note that if all the boxes are unchecked, all roles can view the block. To limit the block to particular roles, just check the roles you wish to allow access to.
- Click the Save block button at the bottom of the page.
Take caution when applying roles. If you happen to be the same role as one that you restrict, you will not be able to view the block yourself, even though you created it.