Access callback for the views_plugin_access_role access plugin.
Determine if the specified user has access to a view on the basis of any of the requested roles. If the $account argument is omitted, the current user is used.
function views_check_roles($rids, $account = NULL) {
global $user;
$account = isset($account) ? $account : $user;
$roles = array_keys($account->roles);
$roles[] = $account->uid ? DRUPAL_AUTHENTICATED_RID : DRUPAL_ANONYMOUS_RID;
return user_access('access all views', $account) || array_intersect(array_filter($rids), $roles);
}