You are here

function redhen_org_page_access in RedHen CRM 7

Access callback for organization list page.

1 string reference to 'redhen_org_page_access'
redhen_org_menu in modules/redhen_org/redhen_org.module
Implements hook_menu().

File

modules/redhen_org/redhen_org.module, line 550

Code

function redhen_org_page_access() {
  global $user;
  $redhen_relation_role_permissions = module_exists('redhen_relation') ? redhen_relation_role_get_permissions($user) : array();

  // Regular and relation role checks.
  if (user_access('access redhen orgs', $user)) {
    return TRUE;
  }

  // If any relation role permissions are set, access is granted to see
  // listing pages.
  if (is_array($redhen_relation_role_permissions) && count($redhen_relation_role_permissions) > 0) {
    return TRUE;
  }
}