You are here

function entity_metadata_statistics_properties_access in Entity API 7

Access callback for restricted node statistics properties.

1 string reference to 'entity_metadata_statistics_properties_access'
entity_metadata_statistics_entity_property_info_alter in modules/statistics.info.inc
Implements hook_entity_property_info_alter() on top of statistics module.

File

modules/callbacks.inc, line 224
Provides various callbacks for the whole core module integration.

Code

function entity_metadata_statistics_properties_access($op, $property, $entity = NULL, $account = NULL) {
  if ($property == 'views' && user_access('view post access counter', $account)) {
    return TRUE;
  }
  return user_access('access statistics', $account);
}