Grant farm managers access to Feeds importers.

This commit is contained in:
Michael Stenta 2017-06-29 15:32:49 -04:00
parent 822c9dbec0
commit 03fd5d4441
1 changed files with 17 additions and 0 deletions

View File

@ -15,6 +15,23 @@ function farm_import_ctools_plugin_api($module = NULL, $api = NULL) {
return $return;
}
/**
* Implements hook_farm_access_perms().
*/
function farm_import_farm_access_perms($role) {
$perms = array();
// Grant farm managers access to Feeds importers.
if ($role == 'Farm Manager') {
$types = farm_asset_types();
foreach ($types as $type) {
$perms[] = 'import farm_asset_' . $type->type . ' feeds';
}
}
return $perms;
}
/**
* Implements hook_farm_ui_actions().
*/