Grant farm managers access to Feeds importers.
This commit is contained in:
parent
822c9dbec0
commit
03fd5d4441
|
@ -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().
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue