I tested and they do not work together. Is it possible? When checking file access (code below), did not see a way to "see" the assigned roles by Og User Role... (I'm Drupal newbie)

/**
 * Implementation of hook_file_download().
 */
function private_download_file_download($filepath) {
  if (strpos($filepath, variable_get('private_download_directory', 'private') .'/') === 0) {
<strong>    if (!user_access('access private download directory', NULL, TRUE)) {
      return -1;
    }
</strong>
    // define default file header attributes
    $header = array(
      'Content-Type: '. file_get_mimetype($filepath),
      'Content-Length: '. filesize(file_create_path($filepath)),
      'Content-Disposition: attachment; filename="'. mime_header_encode(basename($filepath)) .'"'
    );
    // additional user-defined file header attributes (if any)
    return array_merge($header, explode("\n", variable_get('private_download_header', "Content-Transfer-Encoding: binary\nCache-Control: max-age=60, must-revalidate")));
  }
}

Comments

johnhanley’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Closing due to Drupal 6 end-of-life cycle.