Commit 7dce5c71 authored by Kevin Paxman's avatar Kevin Paxman
Browse files

Make it so users who aren't allowed to see content can't see the home page listing

parent 84a8455e
......@@ -14,7 +14,7 @@ function uw_ct_opportunities_block_info() {
$blocks['front_page'] = array(
'info' => t('Opportunities: front page'),
'cache' => DRUPAL_CACHE_GLOBAL,
'cache' => DRUPAL_CACHE_PER_ROLE,
);
return $blocks;
......@@ -74,6 +74,11 @@ function uw_ct_opportunities_block_view($delta = '') {
$block = array();
switch ($delta) {
case 'front_page':
// If the user doesn't have permission to access content, don't display this block.
if (!user_access('access content')) {
return NULL;
}
$block['subject'] = t('Opportunities');
$current_date = date("Y-m-d h:i:s");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment