node_permission

  1. drupal
    1. 8
    2. 7
Versions
8 – 7 node_permission()

Implements hook_permission().

Code

modules/node/node.module, line 1505

<?php
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'),
    ), 
    'access content' => array(
      'title' => t('View published content'),
    ), 
    'view own unpublished content' => array(
      'title' => t('View own 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'),
    ),
  );

  // Generate standard node permissions for all applicable node types.
  foreach (node_permissions_get_configured_types() as $type) {
    $perms += node_list_permissions($type);
  }

  return $perms;
}
?>