You are here

function filefield_view_access in FileField 6.2

Same name and namespace in other branches
  1. 6.3 filefield.module \filefield_view_access()

Access callback that checks if the current user may view the filefield.

2 calls to filefield_view_access()
filefield_file_download in ./filefield.module
Implementation of hook_file_download(). Yes, *that* hook that causes any attempt for file upload module interoperability to fail spectacularly.
theme_filefield in ./filefield.formatter.inc
Theme function for any file that is managed by filefield. It doesn't really format stuff by itself but rather redirects to other formatters that are telling us they want to handle the concerned file.

File

./filefield.module, line 60

Code

function filefield_view_access($field_name) {
  if (module_exists('content_permissions')) {
    return user_access('view ' . $field_name);
  }

  // No content permissions to check, so let's fall back to a more general permission.
  return user_access('access content');
}