Skip to content
Snippets Groups Projects
Commit d7af3ea3 authored by Alex Barth's avatar Alex Barth
Browse files

Upgrade hook_permission().

parent d86b94a3
No related branches found
No related tags found
No related merge requests found
...@@ -119,13 +119,19 @@ function feeds_reschedule($importer_id = NULL) { ...@@ -119,13 +119,19 @@ function feeds_reschedule($importer_id = NULL) {
} }
/** /**
* Implementation of hook_perm(). * Implementation of feeds_permission().
*/ */
function feeds_perm() { function feeds_permission() {
$perms = array('administer feeds'); $perms = array(
'administer feeds' => t('Administer Feeds'),
);
foreach (feeds_importer_load_all() as $importer) { foreach (feeds_importer_load_all() as $importer) {
$perms[] = 'import '. $importer->id .' feeds'; $perms[] = array(
$perms[] = 'clear '. $importer->id .' feeds'; "import $importer->id feeds" => t('Import @name feeds', array('@name' => $importer->config['name'])),
);
$perms[] = array(
"clear $importer->id feeds" => t('Delete items from @name feeds', array('@name' => $importer->config['name'])),
);
} }
return $perms; return $perms;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment