1 node.module | node_permission() |
Implements hook_permission().
File
- core/
modules/ node/ node.module, line 1197 - The core module that allows content to be submitted to the site.
Code
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,
'warning' => t('Bypass all other node permissions.'),
),
'administer content types' => array(
'title' => t('Administer content types'),
'restrict access' => TRUE,
'warning' => t('Define custom content types and delete existing ones.'),
),
'administer nodes' => array(
'title' => t('Administer content'),
'restrict access' => TRUE,
'warning' => t('Edit or delete any content, which may cause irreversible data loss.'),
),
'access content overview' => array(
'title' => t('Access the content overview page'),
'description' => t('Get an overview of <a href="@url">all 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 any unpublished content' => array(
'title' => t('View any unpublished content'),
),
'view revisions' => array(
'title' => t('View content revisions'),
),
'revert revisions' => array(
'title' => t('Revert content revisions'),
),
'delete revisions' => array(
'title' => t('Delete content revisions'),
),
'view hidden paths' => array(
'title' => t('View hidden paths'),
'description' => t('View URL of content, overriding restriction on viewing content directly.'),
),
);
// Generate standard node permissions for all applicable node types.
foreach (node_permissions_get_configured_types() as $type) {
$perms += node_list_permissions($type);
}
return $perms;
}