You are here

function filefield_edit_access in FileField 6.2

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

Access callback for the JavaScript upload and deletion AHAH callbacks. The content_permissions module provides nice fine-grained permissions for us to check, so we can make sure that the user may actually edit the file.

1 string reference to 'filefield_edit_access'
filefield_menu in ./filefield.module
Implementation of hook_menu().

File

./filefield.module, line 49

Code

function filefield_edit_access($field_name) {
  if (module_exists('content_permissions')) {
    return user_access('edit ' . $field_name);
  }

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