function feeds_permission in Feeds 8.2
Same name and namespace in other branches
- 7.2 feeds.module \feeds_permission()
- 7 feeds.module \feeds_permission()
Implements feeds_permission().
Related topics
File
- ./
feeds.module, line 249 - 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["import {$importer->id} feeds"] = array(
'title' => t('Import @name feeds', array(
'@name' => $importer->config['name'],
)),
);
$perms["clear {$importer->id} feeds"] = array(
'title' => t('Delete items from @name feeds', array(
'@name' => $importer->config['name'],
)),
);
$perms["unlock {$importer->id} feeds"] = array(
'title' => t('Unlock imports from @name feeds', array(
'@name' => $importer->config['name'],
)),
'description' => t('If a feed importation breaks for some reason, users with this permission can unlock them.'),
);
}
return $perms;
}