function feeds_permission in Feeds 7
Same name and namespace in other branches
- 8.2 feeds.module \feeds_permission()
- 7.2 feeds.module \feeds_permission()
Implements feeds_permission().
Related topics
File
- ./
feeds.module, line 123 - Feeds - basic API functions and hook implementations.
Code
function feeds_permission() {
$perms = array(
'administer feeds' => array(
'title' => t('Administer Feeds'),
'description' => t('Create, update, delete importers, execute import and delete tasks on any importer.'),
),
);
foreach (feeds_importer_load_all() as $importer) {
$perms[] = array(
"import {$importer->id} feeds" => array(
'title' => t('Import @name feeds', array(
'@name' => $importer->config['name'],
)),
),
);
$perms[] = array(
"clear {$importer->id} feeds" => array(
'title' => t('Delete items from @name feeds', array(
'@name' => $importer->config['name'],
)),
),
);
}
return $perms;
}