Implements hook_permission().
function node_permission() {
$perms = array(
'bypass node access' => array(
'title' => t('Bypass content access control'),
'description' => t('View, edit and delete all content regardless of permission restrictions.'),
'restrict access' => TRUE,
),
'administer content types' => array(
'title' => t('Administer content types'),
'restrict access' => TRUE,
),
'administer nodes' => array(
'title' => t('Administer content'),
'restrict access' => TRUE,
),
'access content overview' => array(
'title' => t('Access the content overview page'),
'description' => t('Access the content overview page at <a href="@url">admin/content</a>.', array(
'@url' => url('admin/content'),
)),
),
'access content' => array(
'title' => t('View published content'),
),
'view own unpublished content' => array(
'title' => t('View own unpublished content'),
),
'view all revisions' => array(
'title' => t('View all revisions'),
),
'revert all revisions' => array(
'title' => t('Revert all revisions'),
'description' => t('Role requires permission <em>view revisions</em> and <em>edit rights</em> for nodes in question, or <em>administer nodes</em>.'),
),
'delete all revisions' => array(
'title' => t('Delete all revisions'),
'description' => t('Role requires permission to <em>view revisions</em> and <em>delete rights</em> for nodes in question, or <em>administer nodes</em>.'),
),
);
// Generate standard node permissions for all applicable node types.
foreach (node_permissions_get_configured_types() as $name => $type) {
$perms += node_list_permissions($type);
}
return $perms;
}