function farm_livestock_weight_individual_report_access in farmOS 7
Individual report view access callback.
Parameters
$farm_asset: The asset to check access for.
Return value
bool Returns boolean value indicating whether or not access is granted.
1 string reference to 'farm_livestock_weight_individual_report_access'
- farm_livestock_weight_menu in modules/
farm/ farm_livestock/ farm_livestock_weight/ farm_livestock_weight.module - Implements hook_menu().
File
- modules/
farm/ farm_livestock/ farm_livestock_weight/ farm_livestock_weight.module, line 268 - Farm livestock weight module.
Code
function farm_livestock_weight_individual_report_access($farm_asset) {
// If the asset is not an animal, deny access.
if ($farm_asset->type != 'animal') {
return FALSE;
}
// Finally, check to see if the user has access to the asset.
return farm_asset_access('view', $farm_asset);
}