I have a module that has permission hook for normal access and for administrative access. I want to display two different blocks to different set of users. Say, the "admin" will only get to view one block and a "site owner" will see the other display.
So, till now what I have done is, declared 2 hook_block_info() as,
$blocks = array();
//Block for the Normal Site Owners
$blocks['payouts'] = array(
'info' => t('Listing of Payouts'),
'cache' => DRUPAL_NO_CACHE,
);
//Block for the Administrators
$blocks['commission_payments'] = array(
.....
.....
);
When I declare the hook_block_view() I use user_access() to restrict the user's to see it. But is there any way I can restrict the user's to view the block infos in the region settings ? Is there any array parameter for hook_block_info that can achieve this? I suppose the 'page' parameter will only handle the page where to display the block.