3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Implement hook_farm_manager_perms().

This commit is contained in:
Michael Stenta 2015-09-08 15:15:55 -04:00
parent a0f623741b
commit a4e0722efe

View file

@ -18,6 +18,32 @@ function farm_log_permission() {
);
}
/**
* Implements hook_farm_manager_perms().
*/
function farm_log_farm_manager_perms() {
// Grant manager permissions to default log types and taxonomies.
$types = array(
'log' => array(
'farm_activity',
'farm_movement',
'farm_observation',
),
'taxonomy' => array(
'farm_observation_types',
'farm_priority',
'farm_quantity_units',
),
);
$perms = farm_manager_entity_perms($types);
// Add 'view farm logs' permission.
$perms[] = 'view farm logs';
return $perms;
}
/**
* Implements hook_farm_admin_actions().
*/